I have a script in my Django project that needs to run every 5 mins.
I am using this cron module to run my script named 'cron.py' present in myproject/myapp/cron.py
But when I am running the sever, the script is not running at all (no output) but the job is showing when I am doing "python manage.py crontab show" as mentioned in the link above.
Also, when I run the script by explicitly going and running by issuing 'python cron.py', it is showing (notifier is the name of myapp)
Traceback (most recent call last):
File "cron.py", line 2, in
from notifier.models import *
ImportError: No module named notifier.models
Everything is working perfectly when i'm copy-pasting this same code in cron.py on python command line and running.
Can you please help me out in the right direction? I've looked everywhere on the internet.
Using Python 2.7.10 and Django 1.8 with Postgresql DB.