Sunday 16 December 2007

Script is not running as cron job

Be sure you set cron job right.
I assume your script is running manually.
You can check it has executed from cron
# tail -f /var/log/cron

Also check root mails to errors.
# less /var/mail/root

Probably you have environment variables problem.
You can check differences between you cron and command environment
# env > /tmp/envmanual
and put a cron job
* * * * * env > /tmp/envcron

Look for differences
# diff /tmp/env*
Put differences that you found in your script and export them.
e.g export TERM=linux

No comments: