Strange python script behaviour
spam.buster at web.de
Tue Aug 4 10:08:23 CEST 2009
> The strangest thing is that if I change command in CRON
> python /home/xxx/script.py
> python /home/xxx/script.py > /tmp/script.log 2>&1
> the script always works correctly!!!
> The question is WHY? Any ideas?
Seems to me that this is more of a shell thing...
First of all, it is always a good idea to call applications with their full
path from cronjobs:
/usr/bin/python /home/xxx/script.py or whatever the output of your "which
python" may be.
How did you create the cronjob? Dependending on the editor you used, maybe
there is a missing newline...
More information about the Python-list