I have a python script that works great when I execute it manually through SSH. But when I set up a cronjob to run it, I get back this error every time.
ImportError: No module named django.core.management
I've tried setting up django via these two methods and got the same error message with each:http://blog.capstrat.com/tags/crontab/http://superjared.com/entry/django-and-crontab-best-friends/
Have you tried indicating the full path to the module?
Maximum Cash Discount on any plan with MAXCASH
Bear with me, I'm a Python newb. the import statement looks like this now:from django.core.management import setup_environ
how would I change that to include the full path??
Thanks for you help, I just figured it out. I guess crontabs on dreamhost run without environment. I added this to the top of my script
import sys, ossys.path.append(‘/home/username/django/django_projects’)sys.path.append(‘/home/username/django/django_src’)
per a comment I found on this Blog:
hope this helps someone!