How to Schedule a Shutdown in Windows 10

To schedule a shutdown in Windows 10, press Windows logo key + R, type shutdown /s /t 3600, and select OK. The number is the delay in seconds, so 3600 shuts the PC down in one hour. To cancel, run shutdown /a. For a shutdown at the same time every day, create a task in Task Scheduler.

Applies to: Windows 10. Windows 10 reached end of support on October 14, 2025, and only PCs enrolled in Extended Security Updates still get security fixes, through October 12, 2027.

When the timer runs out, Windows closes open apps without asking you to save. Save your work before the time is up.

Shut down after a set time

  1. Press Windows logo key + R to open Run.
  2. Type shutdown /s /t followed by the number of seconds, such as shutdown /s /t 3600 for one hour.
  3. Select OK.
Windows 10 Run box with the shutdown /s /t 3600 command highlighted
Type the shutdown command with the delay in seconds (1), then select OK (2).

Windows shows a notice that it will shut down. Some handy values are 900 (15 minutes), 1800 (30 minutes), 3600 (1 hour), and 7200 (2 hours). A countdown you didn’t set usually comes from another app or task; turning off an automatic shutdown in Windows 11 shows where to look.

The same command works in Command Prompt. Use /r instead of /s to restart instead. To show your own reminder in the notice, add a comment, such as shutdown /s /t 3600 /c "Saving energy".

Cancel a scheduled shutdown

Press Windows logo key + R, type shutdown /a, and select OK. This only works while the timer is still counting down.

Shut down at a specific time

To shut down at a clock time tonight, such as 11 PM, instead of after a delay:

  • PowerShell: open PowerShell and run shutdown /s /t ([int]((Get-Date "23:00") - (Get-Date)).TotalSeconds). Change 23:00 to the time you want. It works for any time later today.
  • Task Scheduler: follow the daily steps below, but choose One time instead of Daily and pick the date and time.

Shut down at the same time every day

  1. Select Start, type Task Scheduler, and open it.
  2. In the Actions pane on the right, select Create Basic Task.
  3. Name the task, such as “Nightly shutdown”, and select Next.
  4. Choose Daily, select Next, set the start time, and select Next.
  5. Choose Start a program and select Next.
  6. In Program/script, type shutdown. In Add arguments, type /s /t 60 to give yourself a one-minute warning.
  7. Select Next, then Finish.
Windows 10 Create Basic Task Wizard Start a Program page with shutdown and its arguments highlighted
Type shutdown (1), add /s /t 60 (2), and select Next (3).

To change or remove it later, open Task Scheduler, select Task Scheduler Library, and find your task. Right-click it to Disable it or open Properties.

Make a one-click shutdown timer

  1. Right-click the desktop and select New > Shortcut.
  2. For the location, type shutdown /s /t 3600 for a one-hour timer, and select Next.
  3. Name it Shut down in 1 hour and select Finish.
  4. Make a second shortcut with shutdown /a named Cancel shutdown, so you can stop it with one click.

Other useful options

  • /r restarts instead of shutting down, such as shutdown /r /t 600.
  • /f forces open apps to close. Any unsaved work in them is lost, so use it only for unattended PCs.
  • /h puts the PC into hibernation right away, if hibernation is turned on.

Troubleshooting

  • The scheduled task doesn’t run. The PC may be asleep. Open the task’s Properties, select the Conditions tab, and tick Wake the computer to run this task. On the General tab, choose Run whether user is logged on or not.
  • shutdown /a shows “Unable to abort the system shutdown because no shutdown was in progress. (1116)”. The timer already ended or was never set. Nothing needs cancelling.
  • An app stops the shutdown. Apps with unsaved work can block it. Save and close them first, or add /f to the command.

Frequently asked questions

Can I add a message to the shutdown notice?

Yes. Add /c and your text in quotes, such as shutdown /s /t 1800 /c "PC turns off in 30 minutes. Save your work.".

What’s the longest delay I can set?

The delay can be anywhere from 0 to 315360000 seconds, which is 10 years. If you leave out /t, Windows waits 30 seconds.

How do I shut down right away?

Use shutdown /s /t 0, or pick any of the usual ways to shut down Windows 10.

Can I make the PC sleep on a timer instead?

Windows has no sleep timer command, but you can set the PC to sleep after it’s idle in Settings > System > Power & sleep.

How do I check whether a shutdown is scheduled?

Windows shows a notice when you set the timer, but there’s no built-in countdown. If you’re unsure, run shutdown /a. It either cancels the timer or tells you none was set.

To run a shutdown command with a double-click, put it in a batch (.bat) file.

Every switch is listed in the shutdown command reference.

Related: how to create a macro in Windows 10.