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
- Press Windows logo key + R to open Run.
- Type
shutdown /s /tfollowed by the number of seconds, such asshutdown /s /t 3600for one hour. - Select OK.

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
- Select Start, type
Task Scheduler, and open it. - In the Actions pane on the right, select Create Basic Task.
- Name the task, such as “Nightly shutdown”, and select Next.
- Choose Daily, select Next, set the start time, and select Next.
- Choose Start a program and select Next.
- In Program/script, type
shutdown. In Add arguments, type/s /t 60to give yourself a one-minute warning. - Select Next, then Finish.

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
- Right-click the desktop and select New > Shortcut.
- For the location, type
shutdown /s /t 3600for a one-hour timer, and select Next. - Name it Shut down in 1 hour and select Finish.
- Make a second shortcut with
shutdown /anamed Cancel shutdown, so you can stop it with one click.
Other useful options
/rrestarts instead of shutting down, such asshutdown /r /t 600./fforces open apps to close. Any unsaved work in them is lost, so use it only for unattended PCs./hputs 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.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.