How to Create a Shutdown Timer in Windows 10

Four 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 four 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. Select 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. Select 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. Select 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. Select 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. Select 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.

Using PowerShell for Immediate Shutdown

If you'd like a quick and immediate shutdown for Windows, use Windows PowerShell, the Start-Sleep, and the Stop-Computer cmdlets. The Start-Sleep cmdlet suspends activities in a script for a specified period of time. This puts applications to sleep or closes them. The Stop-Computer cmdlet will shut down the specified computer.

  1. In Windows Search, enter powershell and select either Windows PowerShell or Windows PowerShell ISE.

  2. At the prompt, enter Start-Sleep -s ##; Stop-Computer -ComputerName localhost. Where -s represents Seconds and ## is the number of seconds. In our example, we use 1800.

    For the local computer, use ComputerName localhost or specify the computer name you wish to shut down.

    Windows PowerShell ISE.
  3. Press Enter.

    Make sure you've saved or closed any documents or apps as this will shut down your computer immediately.

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. Select Enter.

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

    The Action pane in the Task Scheduler showing Create Basic Task.
  4. In the Name and Description boxes, enter a name and description of your task.

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

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

    The Task Trigger window.
  7. Select 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. Select Next.

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

    Task Scheduler Action Windows with Start a Program highlighted
  11. Select 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, select Open.

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

  15. In the Summary window, select Finish.

    The Summary window showing the Finish button.

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

  • How can I set a sleep timer on my Windows 10 PC?

    To set your Windows 10 sleep timer, you'll change your Windows sleep settings. In the Search box, search for sleep, and select Power & sleep settings from the results. In the Sleep section, under When plugged in, PC goes to sleep after, select the drop-down box to choose the amount of time you want your computer to remain idle before going to sleep.

  • How do I set a shutdown timer in Windows 8?

    To set a shutdown timer in Windows 8, press Windows+X to bring up the Quick Access Menu. Select Run, enter a shutdown command in the box > OK. Or, open Task Scheduler and choose Create Basic Task, enter shutdown > Next. Then, select the start date, shutdown time, and frequency and follow the prompts.

Was this page helpful?