Skip to content

This guide isn’t available in Nederlands yet, so we’re showing the original English version.

Windows

How to Schedule an Automatic Shutdown on Windows

To shut down after a set time, run shutdown -s -t followed by the number of seconds, for example shutdown -s -t 3600 for one hour. To shut down at the same time every day, create a task in Task Scheduler. Cancel any scheduled shutdown with shutdown -a.

Updated
Time
5 minutes
Difficulty
Easy
Applies to
Windows

By Published Oct 6, 2026

Quick answer

  1. 1 Press Win + R.
  2. 2 Type shutdown -s -t 3600 (3600 seconds = 1 hour) and press Enter.
  3. 3 To cancel, press Win + R and run shutdown -a.
  4. 4 For a daily shutdown, use Task Scheduler with the program shutdown and arguments -s -f.
On this page
  1. Before you start
  2. Shut down after a countdown
  3. Shut down at the same time every day
  4. Troubleshooting
  5. Frequently asked questions

Before you start

  • A Windows PC

Method 1 Shut down after a countdown

  1. Step 1: Open Run

    Press Win + R.

  2. Step 2: Enter the command

    Type shutdown -s -t followed by the number of seconds and press Enter. Windows shows a notice with the shutdown time.

  3. Step 3: Cancel if needed

    Run shutdown -a to abort.

Examples
shutdown -s -t 1800    (30 minutes)
shutdown -s -t 3600    (1 hour)
shutdown -s -t 7200    (2 hours)
shutdown -a            (cancel)

Method 2 Shut down at the same time every day

  1. Step 1: Open Task Scheduler

    Search for Task Scheduler in Start and open it.

  2. Step 2: Create a basic task

    Click Create Basic Task, name it “Nightly shutdown” and click Next.

  3. Step 3: Set the schedule

    Choose Daily and set the time, for example 23:30.

  4. Step 4: Set the action

    Choose Start a program. In Program/script, type shutdown; in Add arguments, type -s -f -t 60. The 60-second delay gives you time to cancel.

  5. Step 5: Finish

    Click Finish. To stop it later, right-click the task and choose Disable or Delete.

Troubleshooting

The scheduled task doesn’t run

Open the task’s Properties, select Run whether user is logged on or not and Run with highest privileges. On laptops, untick Start the task only if the computer is on AC power in the Conditions tab.

“A system shutdown has already been scheduled”

Run shutdown -a to cancel the existing one, then schedule again.

Frequently asked questions

How do I restart instead of shut down?

Use -r instead of -s, e.g. shutdown -r -t 600.

Can I make a desktop shortcut?

Yes. Right-click the desktop > New > Shortcut and enter the full command, e.g. shutdown -s -t 3600.

Summary

Run shutdown -s -t [seconds] for a one-off timer and shutdown -a to cancel. For a daily routine, create a Task Scheduler task that runs shutdown -s -f -t 60.

Sources

Written by

James Chambo

Founder

James is the Founder and Senior Editor of OnlineHow with more than 20 years of experience in internet publishing.