crontab and reboot

Tony Pursell ajp at princeswalk.fsnet.co.uk
Thu Nov 25 11:50:52 UTC 2010


On Thu, 2010-11-25 at 11:35 +0000, Oliver Marshall wrote:
> Hi chaps
> 
>  
> 
> If I want to schedule a reboot every four hours, do i need to enter
> the command as;
> 
>  
> 
> 01 /4 * * * root shutdown now -r
> 
>  
> 
> or
> 
>  
> 
> 01 /4 * * * shutdown now -r
> 
>  
> 
> (note the lack of root).
> 
>  
> 
> I'm using the latter but it's not working. 
> 
>  
> 
> Olly
> 
>  
> 
> 

It may be because it should be 

shutdown -r now

(man page specifies OPTIONS before TIME).

It must, of course, be run as root.

Tony

PS I know nothing about cron jobs.







More information about the ubuntu-users mailing list