To avoid restarting server during working hours you easily schedule restart to be performed at night. Obviously the same can be applied to a workstation rather than server.
Create a text file restart.txt with text:
shutdown /r /c “Your message displayed before restart”
If you want to shut down instead of restart, use this text instead:
shutdown /s /c “Your message displayed before shut down”
Rename the file to restart.bat
a. For Windows Server 2003 and Windows XP
Start > Programs > Accessories > System Tools > Scheduled Tasks
Add a new Scheduled task
In Task Tab > Browse > select your restart.bat file
In Schedule Tab > Schedule Task > select Once and set the restart date and time
b. For Windows Server 2008 and Windows 7
Start > All Programs > Accessories > System Tools > Task Scheduler > Task Scheduler Library
Create Basic Task
Name: Restart
Trigger: One Time, select Date and Time
Action: Start a program – select your restart.bat file
Finish
When restart is initiated and message is displayed you have 30 seconds to cancel the restart:
Start > Run >cmd
shutdown -a
Windows Server 2003
Windows Server 2008
Windows XP
Windows 7
Leave a Reply