How to Create a Shutdown Timer in Windows 10

Three ways to automate shutdowns one-time or for regularly scheduled dates

What to Know

  • For one-time use: Open Command Prompt, then type shutdown –s –t > # of seconds > Enter.
  • Also, for one-time needs: Use the Run command: shutdown –s –t > # of seconds > OK.
  • You can also use Task Scheduler to create a detailed system and schedule for regularly scheduled shutdown events.

This article explains three ways to set a specific, automatic shutdown time for your PC. We also include information on how to stop a scheduled shutdown.

How to Schedule a Computer to Shut Down With Command Prompt

Follow these steps to use the command prompt for a one-time shutdown.

  1. In the Windows Search Box, type CMD.

  2. Click Enter.

  3. In the Command Prompt window, type shutdown -s -t and the number of seconds you want.

    The Command Prompt window showing the shutdown command for 20 minutes.


    Note the CMD and Run command processes use seconds to measure time, not minutes. For example, if you want to shut down in 10 minutes, use 600 seconds. If you want your computer to shut off in 10 hours, use 36,000. The choice is always yours; remember to add it in seconds instead of minutes.

  4. Click Enter.

  5. A window will pop up, warning you Windows will shut down in the amount of time you requested.

    The Windows logon reminder showing the amount of time remaining before automatic logoff.

That's it. Your computer will now automatically shut down at the time you specified. You'll receive a warning a few minutes before shutdown to remind you then, too.

The Windows shutdown warning a few minutes before the computer shuts down.

No longer want your computer to shut down at a specific time? Cancel the request by opening the Command Prompt and typing shutdown -a. Click Enter.

The Logoff is cancelled warning window.

How to Set up Automatic Shutdown With the RUN Command

Follow these steps to use the command prompt for a one-time shutdown.

  1. In the Windows search box, type RUN.

    You can also press the Windows button + R at the same time instead.

  2. Click Enter.

  3. In the Run dialog box, type shutdown -s -t and the number of seconds you need.

    The Run dialog box with the shutdown command for 20 minutes.
  4. Click OK.

  5. A window will pop up showing you that it received your request, and your computer will log off at the time you requested.

How to Use Task Scheduler to Set up Regular Shutdowns

If you need to set a shutdown timer for multiple uses (i.e., daily or weekly automatic shutdowns), it's best to use the Task Scheduler, so you don't have to remember to set things up all the time. Follow these steps:

  1. Open the Task Scheduler by typing Schedule into the Windows search box.

  2. Click Enter.

    The Task Scheduler option in the Windows search box.
  3. In the Task Scheduler, go to Actions and click Create Basic Task.

    The Action pane in the Task Scheduler showing Create Basic Task.
  4. Name and describe your task in the Name and Description boxes.

    Naming and describing a task in Task Scheduler.
  5. Click Next.

  6. In the Create Basic Task Wizard window, select a trigger.

    The Task Trigger window.
  7. Click Next.

  8. Enter the dates and times as needed using the prompts from the Wizard.

    The Task Scheduler window showing date and time prompts.
  9. Click Next.

  10. In the Action window, select Start a program.

    Task Scheduler Action Windows with Start a Program highlighted
  11. Click Next.

  12. In the Start a Program window, use the Browse button to select the shutdown program on your computer. It might say shutdown.exe or some other form of shutdown, depending on your computer.

    Two windows showing the Browse button to help select the Shutdown program.
  13. After you have selected the shutdown file, click Open.

  14. In the Start a Program window, click Next.

  15. In the Summary window, click Finish.

    The Summary window showing the Finish button.

With these three different approaches, you can manage your computer's time and energy with ease.

Was this page helpful?