Quick answer: For a one-off timer, press Win + R, type shutdown /s /t 3600 and press Enter; the PC shuts down in 3,600 seconds (one hour). Cancel it with shutdown /a. To shut down at the same time every day, create a task in Task Scheduler that runs shutdown with the arguments /s /f /t 60.
Applies to: Windows 11 and Windows 10. No extra software is needed.
In this guide

Shut down after a set time (one-off)
The built-in shutdown command takes a delay in seconds after /t:
- Press Win + R to open Run (or open Command Prompt).
- Type
shutdown /s /t 1800and press Enter. Here 1800 seconds is 30 minutes. - Windows shows a notice that it will shut down. Keep working; save everything before the time runs out.
Handy values: 900 = 15 minutes, 3600 = 1 hour, 7200 = 2 hours, 14400 = 4 hours. Use /r instead of /s to restart rather than shut down.
Note: whenever the delay is more than 0, Windows treats it as a forced shutdown, so open apps close without asking to save. Save your work first.
Cancel a scheduled shutdown
Changed your mind? Press Win + R, type shutdown /a and press Enter. A notification confirms the shutdown was cancelled. This only works while the countdown is still running.
Shut down at the same time every day

- Click Start, type Task Scheduler and open it.
- In the right pane, click Create Basic Task. Name it, for example Nightly shutdown, and click Next.
- Choose Daily (or Weekly for chosen weekdays), then set the start date and time.
- Choose Start a program. In Program/script type
shutdown, and in Add arguments type/s /f /t 60. - Click Next and Finish.
The 60-second delay gives you a warning and a chance to run shutdown /a if you’re still working. To run the task even when nobody is signed in, open it from Task Scheduler Library, choose Properties and select Run whether user is logged on or not; Windows will ask for the account password.
Create the daily task with one command
If you prefer the command line, run this in Command Prompt as administrator (change the time to suit you):
schtasks /create /tn "Nightly shutdown" /tr "shutdown /s /f /t 60" /sc daily /st 23:00
To remove it later, run schtasks /delete /tn "Nightly shutdown" /f, or delete the task in Task Scheduler.
Make a one-click timer shortcut

- Right-click the desktop and choose New > Shortcut.
- For the location, type
shutdown /s /t 3600and click Next. - Name it, for example Shut down in 1 hour, and click Finish.
Make a second shortcut with shutdown /a named Cancel shutdown so you can stop the timer just as quickly.
Things to know before you rely on it
- Pending updates: if Windows has updates waiting, a scheduled shutdown may install them first. See how to shut down without updating if that’s a problem.
- Fast Startup: a normal shutdown in Windows 11 and 10 is a partial hibernation when Fast Startup is on. If you want a full shutdown each night, use
shutdown /s /f /t 60(which already does a full shutdown) or turn off Fast Startup. - Sleep and hibernate:
shutdown /hhibernates immediately, but it can’t be combined with a timer. For sleep, use the power settings instead. - Laptop on battery: in Task Scheduler, the Conditions tab can stop a task from starting on battery power, so check it if a laptop doesn’t shut down.
Related guides
- How to shut down without updating in Windows 11 and 10
- How to disable Fast Startup in Windows 11 and 10
- How to open Command Prompt as administrator
- Log on as a batch job: how to grant the right in Windows
- Windows 10 slow boot: how to find the cause and fix it
Official sources: for more detail, see Microsoft’s own pages:
Frequently asked questions
Does Windows have a built-in shutdown timer?
Not as a button, but the shutdown /s /t command and Task Scheduler do the same job without any extra app.
What’s the longest delay I can set?
The /t value can go up to 315,360,000 seconds (10 years), so any practical delay works.
Why did my PC restart instead of shutting down?
Check that you used /s and not /r. If updates were pending, Windows may also restart to finish installing them.
Leave a Reply