[ale] Cron for re-boot

Geoffrey esoteric at 3times25.net
Fri Mar 1 08:20:51 EST 2002


Well, I give up. :(  I changed my cron entry and logged out, the machine 
still rebooted.  The only think I could figure is that cron is not being 
notified, or cron is not running.

Geoffrey wrote:
> How did you add the entries to the cron file?  Did you edit it by hand, 
> or use 'crontab -e?'  If you edit it by hand, you have to 'tell cron' to 
> reread the crontab file.  I always use crontab -e which notifies cron 
> for you.  What we used to do is edit the file, kill and restart cron.
> 
> By the way, I successfully rebooted my box here with:
> 
> 25 8 * * * /sbin/shutdown -r now > /tmp/reboot.out 2>/tmp/reboot.err
> 
> No quotes, just like this.
> 
> This is a P166, running RH 7.2
> 
> James P. Kinney III wrote:
> 
>> I think it's croaking on the flags to shutdown. Try putting it all in
>> quotes. Or, make a shell script that calls the command and call that
>> from cron.
>>
>> On Fri, 2002-03-01 at 07:17, sangell at nan.net wrote:
>>
>>> 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.
>>>
>>>
> 
> 


-- 
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