Cron task to reboot computer?

Howdy,

I've setup a simple cron task in /etc/crontab to reboot the computer every morning at 6AM but it's not working. It reads as follows:

minute hour mday month wday who command
0 6 * * 1-5 root reboot

Anyone got any ideas why it wouldn't run?

thanks
A

15 MacBook Pro 2.4Ghz, Mac OS X (10.5.2)

Posted on Feb 18, 2008 8:18 AM

Reply
5 replies

Feb 18, 2008 7:11 PM in response to Doug Niven1

Doug Niven1 wrote:
Usually you need to add the full path of the binary to crontabs


Yes, that's often the case. Also, it's possible that reboot won't work if it's not run by the root user. I know that's the case with shutdown (and the UPS shutdown script that uses shutdown). If it is, then you'll have to put it into the root user's crontab:

<pre class="command">sudo crontab -e</pre>

At least that's the way it is on Tiger...

charlie

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cron task to reboot computer?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.