How to schedule Windows startup, shutdown and restart

To turn on a fully shut-down PC at a set time, look for an alarm in its BIOS or UEFI firmware. Once Windows is running, Task Scheduler can shut down or restart the PC, run a backup, or launch a program on a schedule.
1. Schedule a power-on time in BIOS or UEFI
- Restart the PC and enter firmware setup. The key varies by model, but Delete and F2 are common.
- Look under Power Management for a setting such as Resume by RTC or Power On By Alarm. Check your model’s manual for the exact name and supported power states.
- Enable the alarm, set the time, save your changes, and test it a few minutes ahead with the PC shut down and connected to power.
If your model has no RTC alarm, check whether it supports a Windows wake timer from sleep. In Task Scheduler, an individual task can request this under Conditions → Wake the computer to run this task. Firmware and power settings can still prevent wake-up.
2. Schedule a Windows shutdown
- Open Task Scheduler and choose Create Basic Task.
- Choose Daily, set the time, then select Start a program.
- Enter
shutdown.exeas the program and/s /t 0under Add arguments. Save your work before testing.
A task using /s /t 0 requests an immediate shutdown. Adding /f forces applications to close and can discard unsaved work. If a shutdown has a countdown, shutdown /a can cancel it before the timer ends.
3. Schedule a restart, backup or cleanup
Use the same task setup with /r /t 0 to restart instead. For a backup or cleanup, select the relevant program or script. Run it manually first, verify the destination and access permissions, then set a trigger such as Daily, Weekly or At log on. For Disk Cleanup, save your choices with cleanmgr /sageset:1 and schedule cleanmgr /sagerun:1.
4. Check why a scheduled task did not run
- Power-on alarm: Check the firmware clock and whether the model supports automatic power-on. Leave the computer connected to power.
- Windows task: Check whether the task is enabled, its Last Run Result, the trigger and the account it runs under. On a laptop, check conditions that require AC power.
- Missed run: If appropriate, enable Run task as soon as possible after a scheduled start is missed. Only schedule disruptive work for times when the computer can safely shut down or restart.
References: Microsoft shutdown command and Disk Cleanup options.