How to Schedule a Shutdown on Windows

Windows scheduled shutdown illustration

Windows does not have a simple shutdown timer in Settings, but the built-in shutdown command can power off or restart the PC after a delay. Task Scheduler can run the same command on a recurring schedule.

This applies to Windows 10 and Windows 11.

Does This Affect You?

Use a one-time shutdown for downloads, overnight tasks, or temporary limits. Use Task Scheduler if the PC should shut down at the same time every day.

Schedule a One-Time Shutdown

  1. Open Command Prompt. Administrator rights are not required.
  2. Run the command below, replacing 3600 with the delay in seconds.
  3. Use 1800 for 30 minutes or 7200 for two hours.
  4. Windows will show a shutdown warning before the timer ends.
  5. To cancel, run shutdown /a.
shutdown /s /t 3600

Schedule a Daily Shutdown

  1. Open Task Scheduler.
  2. Click Create Basic Task.
  3. Name it, such as Nightly Shutdown.
  4. Choose Daily and set the time.
  5. Choose Start a program.
  6. Enter shutdown as the program.
  7. Enter /s /f /t 0 as the arguments.
  8. Finish the task.

More Shutdown Command Options

Restart Instead

Use /r instead of /s to restart instead of shutting down.

Cancel a Scheduled Task

Open Task Scheduler, find the task, and choose Disable or Delete.

Add a Warning Message

Add /c "Save your work" to show a custom shutdown message when supported by the delay/time settings.

Unsaved Work

Without /f, shutdown can wait at an unsaved-work prompt. With /f, Windows forces apps closed, which can lose unsaved work.

Sources

  • Microsoft Learn: Shutdown command-line reference
  • Microsoft Support: Task Scheduler overview
  • Microsoft Learn: Schtasks command-line reference
Disclosure: This post may contain affiliate links which means I may receive a commission for purchases made through links. I will only recommend products that I have personally used! Learn more on my Private Policy page.
A thoughtful woman reads a newspaper while enjoying coffee at an indoor workspace.

DEALWEEK

SUBSCRIBE AND GET 20% OFF YOUR NEXT ORDER! OFFER ENDS SOON - DON’T MISS OUT!

We don’t spam! Read our privacy policy for more info.

Shopping Cart