[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Cron for re-boot (correction)



Not that this is a solution, but the below entry will reboot every 
minute at 3 am on the 15th.

I would have expected something like:

0 3 15 * * /sbin/shutdown -r now


Would work.

One note, you might want to redirect the output to a file or something. 
  I had set something up like this before and when the box would reboot, 
it would do a file check (on /var I suspect).  The reason was that cron 
sends the output to mail and it was apparently trying to write the mail 
to the mail file at the same time it was trying to unmount the file system.

I've got a box sitting next to me that I just loaded, but isn't doing 
anything, I'll give this a spin.  What dist is it?

sangell at nan.net wrote:
> All entries have the 3, I just forgot it in my examples:
> 
> *  3  15  *  *
> 
> 
> \_\_\_\_\_\_\_\_\_\_\_/_/_/_/_/_/_/_/_/_/_/
> \_    Steve Angell,  MCSE, CCNA           _/
> \_    MIS Operations Manager               _/
> \_    TSYS Debt Management             _/
> \_    Norcross, GA                                   _/
> \_    Phone 770-409-5570                    _/
> \_    Fax      770-416-1752                   _/
> \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> 
> 
>                                                                                                                    
>                     sangell at nan.ne                                                                                 
>                     t                    To:     ale at ale.org                                                       
>                                          cc:                                                                       
>                     03/01/2002           Subject:     [ale] Cron for re-boot                                       
>                     07:17 AM                                                                                       
>                                                                                                                    
>                                                                                                                    
> 
> 
> 
> 
> I am trying to set a cron job to reboot a server on the 15th of each month
> at 3:00am. I have tried:
> 
> * * 15 * * exec /sbin/shutdown -r now
> and
> * * 15 * * /sbin/shutdown -r now
> and
> * * 15 * * shutdown -r now
> 
> all in /var/spool/cron/root
> 
> None work. I even tried using webmin to add the job but no success. Now the
> funny thing is in while in webmin, I click "Run Now"  and the system
> reboots with the "exec /sbin/shutdown -r now" but no matter how I set the
> time for the job to run it will not restart via cron. I do have 3 other
> jobs that run every night which are successful. I am at a loss. Any ideas?
> 
> 
> \_\_\_\_\_\_\_\_\_\_\_/_/_/_/_/_/_/_/_/_/_/
> \_    Steve Angell,  MCSE, CCNA           _/
> \_    MIS Operations Manager               _/
> \_    TSYS Debt Management             _/
> \_    Norcross, GA                                   _/
> \_    Phone 770-409-5570                    _/
> \_    Fax      770-416-1752                   _/
> \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should
> be
> sent to listmaster at ale dot org.
> 
> 
> 
> 
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
> 
> 


-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.