Skip to content

How-ToOS

How to Set a Shutdown Timer in Windows 11 (and Cancel It)

Want your PC to switch itself off after an overnight download or render? Windows 11's built-in shutdown command can do it on a timer. Following Microsoft's documentation, we show how to set and cancel a shutdown timer, restart or boot to the BIOS instead, and schedule a nightly shutdown with schtasks.

By , Systems & Technical Editor

3 min read

How to Set a Shutdown Timer in Windows 11 (and Cancel It)

Leaving a big game download, a backup or a video render running overnight and want the PC to switch itself off when it's done? Windows 11 has a built-in shutdown command that can do it on a timer, with no extra software. This guide follows Microsoft's official documentation for the shutdown and schtasks commands.

Step 1: Open a terminal

Open Terminal, PowerShell or Command Prompt. Microsoft notes that users must be assigned the "Shut down the system" user right to shut down a computer with the command. If you're new to the terminal, our Windows Terminal guide covers the basics.

Step 2: Set the timer

Use /s to shut down and /t to set the delay in seconds. For example, to shut down in one hour (3,600 seconds):

shutdown /s /t 3600

Some handy values: 1800 is 30 minutes, 7200 is two hours and 10800 is three hours. Microsoft says the valid range for /t is 0 to 315360000 seconds (10 years), and the default is 30 seconds if you don't set one.

Two things to know before you rely on it:

  • Unsaved work can be lost. Microsoft says that if the time-out is greater than 0, the /f parameter is implied, and /f forces running apps to close without warning users. Save everything you care about before the timer runs out.

  • Make sure the job will be finished. Windows doesn't know whether your download or render is complete, so allow plenty of time.

Step 3: Restart, hibernate or boot to the BIOS instead

The same command does more than shut down:

Command

What it does

shutdown /r /t 3600

Restarts the PC after one hour

shutdown /s /hybrid /t 3600

Shuts down and prepares the PC for fast startup (Microsoft says /hybrid must be used with /s)

shutdown /h

Puts the PC into hibernation straight away, if hibernation is enabled

shutdown /r /fw /t 0

Restarts straight into the firmware (UEFI/BIOS) interface

shutdown /r /o /t 0

Restarts to the Advanced boot options menu

Microsoft's documentation only mentions /f as a switch to combine with /h, so if you want a timed hibernate rather than a shutdown, a scheduled task (see Step 5) is the safer route. If you're not sure which power state you want, we explain the difference in sleep vs hibernate.

You can also add a note with /c and up to 512 characters, enclosed in double quotation marks:

shutdown /s /t 3600 /c "Shutting down after the download"

Step 4: Cancel a shutdown timer

Changed your mind? Run:

shutdown /a

Microsoft says /a aborts a pending shutdown, and it must be run during the time-out period. Once the timer runs out it's too late.

Step 5: Schedule a regular shutdown with schtasks

If you want the PC to shut down at the same time every night, create a scheduled task with schtasks. Microsoft's /sc parameter sets the schedule type (for example DAILY or ONCE), /tn names the task, /tr sets the program to run and /st sets the start time in 24-hour HH:mm format. For example, to shut down at 23:30 every day:

schtasks /create /tn "Nightly shutdown" /tr "shutdown /s /t 60" /sc daily /st 23:30

Using /t 60 gives you a minute to run shutdown /a if you're still using the PC. To remove the task later, delete it in the Task Scheduler app; our Task Scheduler guide shows how to manage tasks with the graphical tool.

If your concern is power cuts rather than routine shutdowns, see how to set up a UPS to shut down your PC automatically. And if you want the PC to wake itself up again remotely, see how to enable Wake-on-LAN in Windows 11.

The bottom line

To switch your PC off on a timer, open a terminal and run shutdown /s /t followed by the delay in seconds (for example shutdown /s /t 3600 for one hour), and use shutdown /a before the timer runs out to cancel it. Save your work first, because any time-out above zero forces apps to close. For a nightly shutdown, create a daily task with schtasks or Task Scheduler instead.

Sources

  1. 01Microsoft Learn: shutdown
  2. 02Microsoft Learn: schtasks create

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Use BGInfo to Show Your PC's Name, IP Address and Specs on the Desktop

How-To

How to Use BGInfo to Show Your PC's Name, IP Address and Specs on the Desktop

Want your PC's name, IP address and key details on screen without digging through Settings? Following Microsoft's official documentation, we show how to set up the free Sysinternals tool BGInfo, choose its fields, save a configuration and refresh it at every sign-in, plus its most useful command-line options.

Marcus Thorne3 min

Best Free Ebook Readers for Windows 11 in 2026

Best Picks

Best Free Ebook Readers for Windows 11 in 2026

Reading ebooks on a PC doesn't need a subscription. Using the developers' official pages, we pick three free, open-source ebook readers for Windows 11: Calibre for managing and converting a big library, SumatraPDF for a tiny portable viewer, and Thorium Reader for annotations and accessibility.

Hannah Vance3 min

How to Convert Video to 60fps or Slow Motion with Flowframes and RIFE AI

How-To

How to Convert Video to 60fps or Slow Motion with Flowframes and RIFE AI

Flowframes is a free Windows app that uses RIFE AI to add in-between frames, turning 24fps or 30fps video into smoother footage or slow motion. Here's how to install it, choose RIFE CUDA or NCNN and set de-duplication, scene detection and frame rate caps.

Marcus Thorne3 min