Cron Restart

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Cron Restart

Post 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
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome »

Is cron running?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

I dont think that i have an mta running but i could check the logs
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I don't think you need an mta for local delivery but I could quite easily be wrong!
Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

its more likely im wrong mate!!
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome »

short of permissions, do you have full paths specified? is cron enabled to execute as root?
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

Post by tech_fixer »

Try "reboot".

Regards,
Jose.
Post Reply