Friday, November 2, 2007

How to schedule Windows server to reboot automatically?

This can be done with the "psshutdown" utility. It can be downloaded from http://www.sysinternals.com/

Create a new directory on your server, named "C : psshutdown". Place psshutdown.exe into that directory.

Create a file named "shutdown_now.bat" in that same directory.

The file should only have one line: C : psshutdownpsshutdown.exe -r -f -c -t 10

The "10" represents the number of seconds to delay before actually rebooting.

To schedule the reboot for every Sunday at 11:00pm, type the following at a command prompt:
at 23:00 /every:su "C : psshutdownshutdown_now.bat"

Cheers

No comments: