How to schedule a Windows server to reboot at a specified time?

It's about a Windows Server 2003 and Windows Server 2008.

link|improve this question

56% accept rate
feedback

3 Answers

up vote 10 down vote accepted

Make a scheduled task that runs:

shutdown -r -t 01
link|improve this answer
Can the scheduled task delete itself when the task is done? – Toro Apr 30 '09 at 21:25
Can't delete itself, but you can setup a one-time trigger so it'll only run once. – Mark S. Rasmussen Apr 30 '09 at 21:28
1  
If the task is scheduled to run once, there is a "delete this task if it is not scheduled to run again" checkbox under the Settings tab of the scheduled task properties window. The scheduler will remove the task after it has run if not scheduled again. Not sure how that will work in the case of a server reboot, though it is theoretically possible. – Justin Scott Apr 30 '09 at 21:43
Or, if it is a one-time affair, use the /t xxx to set the shutdown to the desired future time. The delay value can be up to 10 years. (But since it is expressed in seconds, having a very long delay calls for a bit of calculus.) – Jesper Mortensen Sep 22 '09 at 14:52
feedback

The easiest way to schedule a simple reboot is to use the AT command along with the shutdown command from the command line.

For example, if you want the server to restart tonight at 2AM, it can be as simple as this:

at 2:00 shutdown /r /f

What the "AT" command does is automatically create a scheduled task for a certain command. It has a ton of parameters that you can specify to repeat it, but by default it'll just run whatever command you specify at the next instance of whatever time you specify.

If you need to change anything after you issue it, you can just go into Administrative Tools > Scheduled Tasks and modify the task.

link|improve this answer
feedback

Try this guide (XP centric but should get you in the right direction)

http://www.electronics.dit.ie/techsupport/Green/How%20to%20schedule%20windows%20XP%20to%20shutdown.doc

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.