Thanks for all the help folks! I solved the issue this morning by running the python script via a BASH script that source my BASH_PROFILE, which contains exports my PYTHONPATH.
Here is what the script looked like: #!/bin/bash . ~/.bash_profile /usr/bin/python /home/user/path/to/django/app/update_feeds.py The file had write permissions set. And here is what the cron looked like: MAILTO="[EMAIL PROTECTED]" 1 * * * * /home/user/django/django_projects/myproject/feed_updater One things for sure, I need to get off Dreamhost. Their forum was crap, and the service ticket I put in didn't produce anything usable. On Mar 5, 5:35 am, Pigletto <[EMAIL PROTECTED]> wrote: > > OK, I'm getting a different error now: > > > Traceback (most recent call last): > > File "update_feeds.py", line 58, in ? > > update_feeds() > > File "update_feeds.py", line 14, in update_feeds > > from knoxd.apps.aggregator.models import Feed, FeedItem > > ImportError: No module named knoxd.apps.aggregator.models > > > I had added the following to mycron: > > > export PYTHONPATH=$PYTHONPATH:$HOME/lib/python2.3/site-packages > > > I'm assuming this solved the previous traceback issue.(?) > > You may see at the solution from webfaction > forum:http://forum.webfaction.com/viewtopic.php?id=1228 > > It works for me and I don't have to set any environment variables > incronsettings. > My script scheduler.py (that is called bycron) starts with the > following: > > # -*- coding: utf-8 -*- > import sys,os > import datetime > > sys.path.append('/home/svnSandbox/newforms-admin') > sys.path.append('/home/svnSandbox/blablabla/projects/xyz) > sys.path.append('/home/svnSandbox/blablabla/projects/xyz/apps') > os.environ['DJANGO_SETTINGS_MODULE'] xyz.settings' > > from django.core.management import setup_environ > import settings > setup_environ(settings) > > (...) > > Of course you have to set paths to fit your application layout. > > -- > Maciej Wisniowski --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---