Problem Cron-Job using Python-Script
Gerhard Haering
gh at ghaering.de
Wed Apr 16 07:39:40 EDT 2003
Andreas Penzel wrote:
> Hello!
>
> I have a Python-Script to create Log-Files und work with them.
> Very well.
> But if I start the Script with Cron it works not correct.
> I often use os.system() to send commands to the shell including paths from
> the os.
> Could this be the problem?
Yes. Cron normally doesn't set any environment variables.
> And if, how to solve?
a) Use full paths.
or
b) Set the PATH in the crontab:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-- Gerhard
More information about the Python-list
mailing list