[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: cron job doesn't seem to be running?



At 17:40 2002/08/29 -0700, you wrote:


0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg

00 2 * * sun /root/scripts/virusScan.sh
00 1 * * sun /root/scripts/backup.sh

Cronjobs specified in the main crontab need to have the username they are to execute as inserted as the sixth field (before the command). These should be something like:


00 2 * * sun root /root/scripts/virusScan.sh
00 1 * * sun backupuser /root/scripts/backup.sh

However, if you want to run these jobs daily, it really is far more elegant to allow the run-parts script to execute them for you. It'll take care of sending meaningful e-mail with the job's output, and make sure that you don't execute both jobs at once (which could be a problem if they're accessing the same block device(s)). The easiest way to do that would be to do:

#cd /etc/cron.daily
#ln -s /root/scripts/virusScan.sh virusScan.cron
#ln -s /root/scripts/backup.sh backup.cron





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]