Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate reboot?

Status
Not open for further replies.

AIXSUN

MIS
Apr 24, 2002
1
CA
Hello
Does anyone know of a script that can be written to automate a shutdown/reboot process at a specific time on a specific day?
The sun box is an Ultra 5 v5.7

Thanks
 
how about an "init 5" in roots crontab ?

crowe
 
Thanks Crowe
One question...how do you do it? I would like to have the sun server perform a shutdown once per week at a scheduled time and to do this every week.

Thanks again
 
edit root's r crontab file (crontab -e). add the entry there and save it. For more info on the format of a cron file, if you are not sure, just do a man on crontab.

crowe
 
Hi,

a remark on the earlier replies:

"init 5" shuts down and does a power-off as well!
I don't think that this is what you want to do... [sad]

What you place in the crontab is the following line (crontab -e as user root)if you want to reboot the machine once a week:

01 00 * * 6 /usr/sbin/shutdown -g0 -i6 2>&1

This example will reboot the machine every Saturday at 00:01.

Cheers,
mrjazz
 
Thanks very much for the help. I will give the above a try. Thanks again
 
sorry AIXSUN and others... I ment "init 6"

crowe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top