Page 1 of 1

Cron Restart

Posted: Mon Apr 10, 2006 11:31 am
by jameswilson
Hi all im struggling on a basic non-zm (well not directly related) issue. I want to restart a box every 24 hours. I have added a crontab with the command shutdown -r now
and also tried init 6

Neither of these autoreboot the box, anyone have a suggestion

Regards

JAmes

Posted: Mon Apr 10, 2006 1:04 pm
by keyboardgnome
Is cron running?

Posted: Mon Apr 10, 2006 3:44 pm
by jameswilson
yes its running everything else fine, just wont restart the system. I have searched a few thigs but i can only find info on using at but id rather use cron

Posted: Mon Apr 10, 2006 4:32 pm
by zoneminder
You may have ot enter the full path to shutdown. For instance /sbin/shutdown as cron has a very limited environment. You root account should have got a mail indicating why it failed anyway.

Posted: Mon Apr 10, 2006 5:07 pm
by jameswilson
I dont think that i have an mta running but i could check the logs

Posted: Mon Apr 10, 2006 5:09 pm
by zoneminder
I don't think you need an mta for local delivery but I could quite easily be wrong!

Posted: Mon Apr 10, 2006 5:10 pm
by jameswilson
its more likely im wrong mate!!

Posted: Mon Apr 10, 2006 6:53 pm
by keyboardgnome
short of permissions, do you have full paths specified? is cron enabled to execute as root?

Posted: Mon Apr 10, 2006 8:29 pm
by tech_fixer
Try "reboot".

Regards,
Jose.