Running python script using cron
Posted by: patrickbeeson
Posted on: 2008-03-04 04:36:00
'm trying to use a cron job to run a python script that updates feeds
on an aggregator site I'm building. But I'm getting trackback errors
telling me it can't import the module feedparser. Here's the error:
Traceback (most recent call last):
File "/path/to/script/update_feeds.py", line 10, in ?
import feedparser
ImportError: No module named feedparser
And here is the cron:
export PYTHONPATH=/path/to/python2.3/site-packages:/path/to/django/app
export DJANGO_SETTINGS_MODULE=myproject.settings
1 * * * * /usr/bin/python /path/to/script/update_feeds.py
Any suggestions on what I'm doing wrong?