Linux+Python: need help, have comments...
Joseph A Knapka
jknapka at earthlink.net
Sun Jan 27 23:43:42 EST 2002
Ron Stephens wrote:
>
> I switched to Linux two weeks ago. Works fine, I like it. One problem,
> can anyone help?
>
> I set up a crontab file using the crontab my_cron_file command. I
> checked it with crontab-l and it is fine. Even set up a cron.allow
> config file. my_cron_file is as such:
>
> 30 4 * * * python mygale.py get all
> 30 5 * * * python urls.py
> 30 6 * * * python urldb.py
> 30 7 * * * python mygale-uploader.py
>
> Now, the intention is to automatically, at 4:30 AM each day, run the
> mygale web spider to collect any new Python articles from the web. At
> 5:30 and then at 6:30, run the associated uls.py and urldb.py scripts,
> and then at 7:30 each day run the automatic FTP uploader script,
> mygale-uploader.py.
>
> When I run these scripts exactly as typed above, from the Bash shell,
> everything works as planned and that's how I have been updating the
> online HTML page that shows the Pythonic articles on my web site. So
> something must be wrong with my_cron_file or something else in the way I
> have cron set up on my Linux box. If any Linux gurus can offer any
> suggestions, I am all ears ;-)))
So... what happens? Do the scripts run but produce errors? Do
they run at all? If there are errors when executing a cron entry,
they will be sent as mail to the user who owns the crontab.
Remember that cron jobs have a very minimal default environment.
If the scripts rely on particular environment variables, you
will need to set them explicitly within the cron job.
Cheers,
-- Joe
"I should like to close this book by sticking out any part of my neck
which is not yet exposed, and making a few predictions about how the
problem of quantum gravity will in the end be solved."
--- Physicist Lee Smolin, "Three Roads to Quantum Gravity"
More information about the Python-list
mailing list