0

I'm trying to set up cron jobs in my django application on a ec2 instance(linux). Everything is working fine, I tried

python3 manage.py cron add

python3 manage.py cron show

python3 manage.py cron remove

everything works just fine

But when I start the apache server, and load the page, I'm getting 500. From the error logs I found that django_crontab module was not found. But it's still there and I've installed it in the virtual environment too (I've double checked with pip3 freeze). I also tried sudo service cron start which didn't show me anything and didn't make any difference. What could be the possible issue here?

Mowli sri
  • 71
  • 1
  • 8
  • is this same environment mod_wsgi is using, did you try it on different environment(locally) – iklinac Nov 10 '20 at 04:55
  • I tried running in my local machine with and without environment, it works fine. But it is not working only on ec2. – Mowli sri Nov 10 '20 at 05:48

1 Answers1

0

Atleast I found the answer myslef. Freezing the pip3 modules and installing it in the server environment solved my issue. MODULE_IMPORT ERROR can be rectified by this method even if your module is not visible when installed manualy using pip3 install module-name. I hope this works for others!

Mowli sri
  • 71
  • 1
  • 8