|
From: Jamie C. <jca...@we...> - 2008-03-01 18:15:09
|
On 01/Mar/2008 09:46 Sasa wrote .. > Ho, I have created a new 'Scheduled Cron Jobs' but if I execute this jobs > with 'run now' it's all ok but when it is schedule isn't running. > In '/var/spool/cron' I have: > > [root@asterisk1 cron]# cat root > MAILTO="" > 8 1 * * * /usr/bin/perl /var/adm/bin/registry.pl > /dev/null 2>&1 > 51 6 * * * /etc/webmin/cron/tempdelete.pl > 21 18 * * * /usr/sbin/amportal restart > > ..and at 21 18 in 'log cron' I have: > > Mar 1 18:21:01 asterisk1 crond[14630]: (root) CMD (/usr/sbin/amportal > restart ) > > ..but amportal isn't restarted ! > If 'run now' I have: > Output from command /usr/sbin/amportal restart .. > > STOPPING ASTERISK > Asterisk Stopped > > STOPPING FOP SERVER > FOP Server Stopped > SETTING FILE PERMISSIONS > Permissions OK > > STARTING ASTERISK > Asterisk Started > > STARTING FOP SERVER > FOP Server Started > > ..where is my error ? > Thanks. Perhaps it is failing due to the lack of some environment variable that is not set when run by cron? You should change the command to : /usr/sbin/amportal restart >/tmp/restart.log 2>&1 and see what gets logged to /tmp/restart.log when it is run from cron. - Jamie |