How to schedule an automatic shutdown in Windows 11 and 10

Laptop showing a clock, set up to schedule an automatic shutdown in Windows

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.

Laptop showing a clock, set up to schedule an automatic shutdown in Windows

Shut down after a set time (one-off)

The built-in shutdown command takes a delay in seconds after /t:

  1. Press Win + R to open Run (or open Command Prompt).
  2. Type shutdown /s /t 1800 and press Enter. Here 1800 seconds is 30 minutes.
  3. 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

Laptop on a wooden desk set to shut down daily with Task Scheduler
  1. Click Start, type Task Scheduler and open it.
  2. In the right pane, click Create Basic Task. Name it, for example Nightly shutdown, and click Next.
  3. Choose Daily (or Weekly for chosen weekdays), then set the start date and time.
  4. Choose Start a program. In Program/script type shutdown, and in Add arguments type /s /f /t 60.
  5. 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

Open laptop ready for a one-click shutdown timer shortcut on the desktop
  1. Right-click the desktop and choose New > Shortcut.
  2. For the location, type shutdown /s /t 3600 and click Next.
  3. 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 /h hibernates 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.

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.

How we write our guides: read our editorial policy.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *