Michael Bevilacqua on 30 Jul 2007 17:14:22 -0000


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

Re: [PLUG] Problems with cron running daily/monthly jobs


On 7/30/07, Mark Baker <mark.baker@hxti.com> wrote:

I have been having problems with cron running the jobs in my /etc/cron.daily directory lately.  The error the cron sends me is "/bin/bash: root: command not found".

Has anyone had the same problem?  I haven't been able to track down the problem.



I would start by looking at your /etc/crontab to see if that file is setup incorrectly. It should look something like:

 
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
0  *  * * *     root    rm -f /var/spool/cron/lastrun/cron.hourly
1  3  * * *     root    rm -f /var/spool/cron/lastrun/cron.daily
15 4  * * 6     root    rm -f /var/spool/cron/lastrun/cron.weekly
30 5  1 * *     root    rm -f /var/spool/cron/lastrun/cron.monthly
*/10  *  * * *  root    test -x /usr/sbin/run-crons && /usr/sbin/run-crons


The position of `root` in this file is important as it tells cron as which user to run the job as.


--
Michael D. Bevilacqua
michael@bevilacqua.us
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug