How to set a timer to shut down your Windows computer regularly

Setting a timer to shut down your Windows PC can be helpful in many cases. For example, if you download a large piece of software or a game, you can set your computer to shut down after a certain amount of time based on the estimated download time. Not only will this save you energy so you can get on with your day, but it will also reduce the unnecessary load on your computer.




Fortunately, Windows offers built-in options for this that are quite easy to use.

How to create a shutdown timer

Useful whether you use Windows 10 or 11

Depending on how you want to use this automation, there are several ways to set a shutdown timer. You can use the Run dialog, Command Prompt, or Task Scheduler to set this up.

Using the Run dialog box.

The Windows Run dialog box is the fastest way to automatically shut down a PC after a certain period of time. Here are the steps to do so.

  1. Use that Windows + R Keyboard shortcut to start the Run Dialog box.
  2. In the text box, type or copy and paste the command Shutdown -s -t XXXX and press Enter, Replace XXXX with the seconds after which you want your PC to automatically shut down. Use for example Shutdown -s -t 7200 if you want to turn off the PC after 2 hours (7200 seconds).
    Screenshot of the Windows Run dialog box with the Shutdown Timer command.

    Always remember to enter the number in seconds, whether you use this method or the command prompt method.

  3. You will receive a notification with the exact time after which your account will be logged out and your computer will be shut down.
    Screenshot of shutdown timer notification


That's it – the shutdown timer has been successfully set. However, if you want to cancel the process at any time before the action is executed, launch and use the Run command box Shutdown -a Command. You will receive a notification that the logout has been canceled.

Using Command Prompt

If you prefer to use Command Prompt, you can set a shutdown timer there using the exact same command. Here's how.

  1. type”PromptIn the Windows search box, right-click its icon and select “ Run as administrator.
  2. In the command line window, type or copy and paste this command and press Enter: Shutdown -s -t XXXX. Replace XXXX with the time in seconds after which you want to shut down the computer. For example, shutdown -s -t 1800 Shut down the PC after half an hour.
    Screenshot of the computer shutdown command from Command Prompt

  3. You will receive a warning from Windows that the PC will shut down in 30 minutes.
  4. If you want to cancel the shutdown timer, use the same cancel command: Shutdown -a. You will be informed again that the deregistration has been cancelled.
    Screenshot of the command to cancel shutdown from Command Prompt


Using Windows Task Scheduler

The above methods will only shut down your PC once and you will have to use the commands again every time you want to set a shutdown timer again. However, to apply this more systematically, e.g. B. if you want to automate shutdown daily or weekly, you can use Windows Task Scheduler. To do this, follow these steps.

  1. In the Windows search box, type: Task planner and click on the corresponding icon to start it.
    Screenshot of Task Scheduler startup

  2. In the Task Scheduler window, select the option Create a simple task Option from the menu on the right.
    Screenshot of creating a basic task

  3. Next, enter the task name, in this example “Automatic shutdown of the PC daily,“, then a short description. Click Next.
    Set a name and description for the task

  4. Now set the frequency with which this task is triggered. For example, you can set it to daily, weekly, monthly or other. Click Next.
    Choose when you want to trigger the task

  5. Set the start date and time you want to shut down your PC. Remember to choose AM or PM if you are using a 12 hour clock. Then click on Next.
    Set the time to schedule the shutdown

  1. Choose the one Start a program Action and click Next.
    Screenshot of the “Start program” selection.

  2. Now click on Browse button under the Program/script Option.
    Search for the shutdown script

  3. Choose Shutdown.exe from the System32 folder and click Open.
    Screenshot of selecting “shutdown.exe”.

  4. Next to Add arguments (optional), type -S and click Next.
    Screenshot of adding an argument

  5. Finally, check the shutdown scheduler task and click Finish.
    Check the automatic shutdown task


That's it. Your automatic shutdown timer is set and will shut down your computer at the selected time and frequency according to your schedule. You can also check if it is working properly.

  1. Open that Task plannerswitch to Task Scheduler Library section on the left and look for the task you created.
    Screenshot of the automatic shutdown scheduler

  2. Select it and click Run Button on the right side.
    Run the shutdown scheduler

  3. If you set everything up correctly, you will receive a warning that Windows will shut down in less than a minute and turn off within a few seconds.
    Screenshot of the shutdown warning

  4. You can also delete the task here if you don't want to keep the shutdown timer.


Easily automate PC shutdown

A shutdown timer on your Windows PC is a great way to automate the process and ensure your device isn't running unnecessarily. This type of setup can help improve a laptop's battery life. Even though you often forget to shut down your PC and simply put it to sleep or hibernate, this is the best way to ensure that it turns off completely on a regular basis, which is a healthy practice.

Leave a Comment