How to set a timer to regularly shut down your Windows computer
Setting a timer to shut down your Windows PC can be helpful in many cases. For example, if you are downloading a large piece of software or a game, you can set your computer to shut down after a particular time, based on the estimated download time. This will not only save energy while allowing you to get on with your day, but also reduce the unnecessary load on your computer.
Thankfully, Windows 11 provides a few methods for setting a timer to shut down your PC, whether it's a one-time thing or you want to do it regularly.
How to create a one-time shutdown timer
Using the Run dialog box
The Windows Run dialog box is the quickest way to automatically shut down a PC after a particular time. Here are the steps for how to do so.
- Use the Windows + R key combination to launch the Run dialog box.
- In the text field, type or copy-paste the command shutdown -s -t XXXX and hit enter, replacing XXXX with the time in seconds after which you want to let your PC automatically shut down. For example, use shutdown -s -t 7200 if you want to turn off the PC after 2 hours (7200 seconds).
Always remember to put the number in seconds, whether using this method or the next one we'll cover.
- You’ll get a notification indicating the exact time after which your account will be signed out and your computer will be shut down.
That’s it — the shutdown timer is successfully set. However, if you wish to cancel it at any time before the action is performed, launch the Run command box and use the shutdown -a command. You’ll get a notification that the log-out has been canceled.
Using the Command Prompt
If you prefer to use Command Prompt, you can use the exact same command to set a shutdown timer there. Here’s how.
- Press Windows + X or right-click the Start menu icon, then choose Terminal (Admin).
- On the command line window, type or copy-paste this command and hit 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 to shut down the PC after half an hour.
- You’ll be warned by Windows as a notification that the PC will be shut down after the set timer (in our example, 30 minutes).
- If you want to cancel the shutdown timer, use this command: shutdown -a. You’ll again be notified that the log-off has been canceled.
How to set a recurring shutdown timer using Windows Task Scheduler
The above methods will shut down your PC only once, and you’ll have to use the commands again every time you wish to set a shutdown timer again. However, to apply this more methodically, e.g. if you want to automate the shutdown daily or weekly, you can use the Windows Task Scheduler. Follow these steps to do so.
- In the Windows search box, type Task Scheduler and click its icon to launch it.
- Under the Task Scheduler window, select the Create Basic Task option from the right-side menu.
- Next, type the task name, such as Automatic Shutdown PC Daily along with task a short description. Click Next.
- Now, set the frequency at which this task will be triggered. For example, you can set it for daily, weekly, monthly, or otherwise. Click Next.
- Set the start date and the time you want to shut down your PC. Remember to choose AM or PM if you are using a 12-hour clock. After that, click Next.
- Choose the Start a Program action and click Next.
- Now, click the Browse button under the Program/script option.
- Select shutdown.exe from the System32 folder and click Open.
- Next to Add arguments (optional), type -s and click Next.
- Finally, review the shutdown scheduler task and click Finish.
That’s it. Your automatic shutdown timer is set and will shut down your computer at the selected time and frequency per your schedule. You can also verify that it will work properly (make sure to save your data before testing this).
- Open the Task Scheduler, switch to the Task Scheduler Library section on the left, and look for the task you created.
- Select it and click the Run button on the right side.
- If you have set everything correctly, you’ll get a warning that Windows will be shut down in less than a minute and will get turned off within a few seconds.
- You can also delete the task from here if you don’t wish to maintain the shutdown timer.
Screenshot of the Windows 11 Task Scheduler over a desktop background© Provided by XDA Developers
If there are certain tasks you'd like your PC to perform automatically, the Windows 11 Task Scheduler lets you do just that
Don't keep your PC on all day
A shutdown timer on your Windows PC is an excellent way to automate the process and ensure that your device is not running through the night when you don't need it to. For a laptop, this could extend your battery lifeand ensure you still have juice the next day, but even a desktop PC will benefit from saving power. There's no point wasting electricity if you don't need your computer to be running, after all.