I'm using Django-Cron to schedule some database stuff. But after I edited my crontab like so:
*/1 * * * * /Users/apple/Documents/Django/pricecompare/manage.py runcrons >> /Users/apple/Documents/Django/pricecompare/app/log.txt"
I'm getting this error sent as "mail":
"Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?"
I'm not using any virtual environment
by the way.
However, when I run the same script directly in the terminal, I don't get any error. I can import Django
in the terminal as well.
Any solutions? I'm using python 2. and I might have copied the code that was supposed to be used in python 3, so I suspect that might be giving me the error.