When you want to schedule a shutdown on Windows 10, you can shutdown on a timer lets you step away from your device without having to cancel long-running tasks. In this guide, we'll show you two methods to allow you to schedule an automatic shutdown, either on a single occasion or on a regular timetable.
Method 1: Using the Command Prompt
The simplest way to add a one-time shutdown timer is by invoking the shutdown using Command Prompt. Launch Command Prompt from the Start menu (type "cmd" into the search box) to begin using this method.
The syntax for the shutdown command is as follows:
shutdown /s /t 300
Type the command and press enter. You'll see a warning that your device will shutdown in 5 minutes. The delay is specified in seconds as the value after /t in the command – change this number to alter how long Windows will wait before shutting down.
You can now close the Command Prompt and keep using your PC. Alternatively, lock it and walk away from it, leaving background tasks to finish up. Either way, Windows will automatically shutdown, forcing closure of all programs, when the timer expires. You can abort the shutdown at any time by running shutdown /a. Here is an expanded list of commands you can use to schedule a shutdown on Windows 10 using Command Prompt.
Method 2: Schedule a shutdown with Task Scheduler
Windows' Task Scheduler utility allows you to run programs on a schedule. A variety of different triggers can be used, although we'll stick to a time-based trigger for this article.
Open Task Scheduler by searching for it in the Start menu. In the Actions pane on the right, click "Create Basic Task" and name the task "Shutdown." Click the "Next" button to proceed.
You now need to define the trigger for the shutdown. You can choose between Daily, Weekly and Monthly recurrence, or opt for a one-time event. Click Next to make your selection and specify the parameters for your trigger. In our case, we'll automatically shutdown the device at 22:00 every day.
Click "Next" to get to the Action configuration screen. Choose "Start a program" and click "Next." Under "Program/script", type shutdown. Type /s /t 0 into the "Add arguments box" – you'll notice from above that we still have to specify a shutdown delay, but by using "0 seconds" the timer expires immediately.
Finally, click "Next" again to review and save your task. It will be automatically enabled when you click the final "Finish" button. You can now rest assured your device will shutdown automatically at the appointed time, so you can keep tasks running even if you're leaving your device unattended.
Now playing: Watch this: Put a shutdown timer on your Windows desktop with this...
1:24
If you ever find yourself in a situation where you need to leave your computer on for several hours, but you want it to shut down once a certain process has finished, reddit user excelhelpneeded111 has a surprisingly simple solution. You don't need any third-party software, and it will only take a minute or two to set up.
Create a shutdown timer for Windows
To create a shutdown timer manually, open Command Prompt and type the command shutdown -s -t XXXX. The "XXXX" should be the time in seconds you want to elapse before the computer shuts down. For instance, if you want the computer to shut down in 2 hours, the command should look like shutdown -s -t 7200.
If you want to restart your computer on a delay, use shutdown -r -t XXXX instead.
To cancel the timer, open the Run window or Command Prompt again and enter shutdown -a.
Create a shutdown timer shortcut
If you need to use a shutdown timer regularly, you can take this trick one step further by turning it into a desktop shortcut.
Taylor Martin/CNET- Right-click on the desktop, hover over New and select Shortcut in the side menu.
- In the path field type "shutdown -s -t XXXX" and click Next.
- Enter a name for the shortcut (for example, "Shutdown 1 Hour") and click Finish.
Any time you double-click the shutdown shortcut, the timer will start. To cancel the timer, you can create a second shortcut using shutdown -a or enter the shutdown -a command in Command Prompt.
To change the time on the shutdown timer, right-click the shortcut icon, select Properties and change the seconds value in the Target field. From within Properties, you can also assign a different image as the icon.
Dedicated programs
If you don't want to create a handful of sleep timer shortcuts or constantly edit the one you have to accommodate different time intervals -- or if you just want a graphical interface -- you're better off installing a dedicated program, like PC Sleep or Sleep Timer. These programs will give you additional options, such as the ability to log out, hibernate, set an exact shutdown time or shut down after a length of inactivity.
Editor's note: This article was updated March 3, 2017, to include additional information about Windows sleep timers.