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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule Task to Reboot server

Status
Not open for further replies.

latitude800

IS-IT--Management
Feb 11, 2006
19
0
0
US
I need to schedule our SQL Server to reboot every night according to our vendor. I am trying to setup a schedule task without success. I cannot find reboot.exe. Would someone tell me where can I find it or a way to write one. Thanks for all your assistance in advance.

Sincerely,

Jimmy
 
shutdown.exe is what you want, not reboot.exe.
 
So using shutdown.exe will reboot the server, I cannot manually restart the server, I am schedule the server to reboot at 11:00 PM. Thank for yourhelp

Sincerly,

Jimmy
 
I think you will need to type shutdown.exe /r to reboot. Go to a command prompt and type shutdown /?. There's all kinds of good stuff you can do.
 
That's correct. You could type that line in a batch file on the server, like mpnut wrote:

shutdown -r

Or it may be /r depending on which version of shutdown.exe you are using - shutdown /? will tell you.

Then use Task Scheduler in Control Panel to schedule that batch file to run at 11:00 PM every day.

One thing to look out for is applications hanging during shutdown, which could leave your computer stuck. I think the -f option forces all applications to close, but depending on the software you have running, you could still have problems. I suggest scheduling this for a time when you can be standing in front of the server the first time you do it. This way you can be sure there is nothing that will hang. If it doesn't do it the first time, you're not likely to see it hang during subsequent reboots.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top