Schedule a Windows Computer Restart with Task Scheduler
Windows Task Scheduler can restart a computer at a controlled time. For servers and managed endpoints, make sure the reboot is approved and will not interrupt active users or dependent services.
Command
The Windows restart command is:
shutdown.exe /r /t 0Create the task
- Open Task Scheduler as an administrator.
- Choose Create Task rather than Basic Task if you need full control.
- On General, use an account appropriate for the machine and select Run with highest privileges if required.
- Create a one-time or recurring trigger.
- Create an action to start
shutdown.exewith arguments/r /t 0. - Review Conditions and Settings so a laptop is not unexpectedly restarted when disconnected or on battery unless that is intended.
Verify before the maintenance window
Use the task History and Last Run Result fields. For a production server, coordinate application shutdown and clustering/HA procedures rather than using a blind restart task.