[ale] Cron for re-boot (correction)

sangell at nan.net sangell at nan.net
Fri Mar 1 08:02:19 EST 2002



I have tried that very command but no luck. I even created a simple text
file and loaded the command in the file and chmod'ed it to 777 and launched
that from cron but no luck! The distro is RH 7.2 and setting the correct
time doesn't seem to be the problem. It doesn't work at ANY time. I can set
the job to run every 5 minutes and it won't run. I can set it for once a
day and it doesn't run. The wierd thing is that almost all of the commands
work if I execute the job manually. ????


\_\_\_\_\_\_\_\_\_\_\_/_/_/_/_/_/_/_/_/_/_/
\_    Steve Angell,  MCSE, CCNA           _/
\_    MIS Operations Manager               _/
\_    TSYS Debt Management             _/
\_    Norcross, GA                                   _/
\_    Phone 770-409-5570                    _/
\_    Fax      770-416-1752                   _/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/


                                                                                                                   
                    Geoffrey                                                                                       
                    <esoteric at 3tim       To:     sangell at nan.net                                                   
                    es25.net>            cc:     ale at ale.org                                                       
                                         Subject:     Re: [ale] Cron for re-boot (correction)                      
                    03/01/2002                                                                                     
                    07:53 AM                                                                                       
                                                                                                                   
                                                                                                                   




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.






More information about the Ale mailing list