[LBo] cronjobs not working
Chris F.A. Johnson
cfaj at freeshell.org
Sat Dec 16 02:08:30 CET 2006
On Fri, 15 Dec 2006, Ben wrote:
> Hi, everyone...
>
> I've been trying to set up a simple cronjob that reboots my server (Centos
> 4.3) every morning at 4. Here's what I've been entering as root:
>
> crontab -e
>
> 0 4 * * * shutdown -r now
>
> This, however, doesn't work. I've tested it with other times and commands
> but none of them seem to run. I've made sure crond is running, crontab -l
> shows my job, my syntax seems correct, and I've even put a blank line after
> my crontab entry like I've read in places. Am I missing something?
Add the full path to the command, e.g. /usr/bin./shutdown.
Better still, don't do it at all. What reason do you have to shut
the machine down?
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
More information about the QnA
mailing list