How to Set a Timer to Shut Down a Computer

You can set a timer to shut down your computer in Microsoft Windows 8.1 by using the Task Scheduler utility or the Command Line tool. The Command Line tool enables you to shut down the computer after the specified number of seconds; the Task Scheduler utility enables you to create a recurring task that shuts down your computer daily at the specified time. If you use the Command Line, note that the default value of the shutdown command is 30 seconds and the maximum value is 315360000 seconds (10 years).

Stopwatch on laptop keyboard.
Your computer does not automatically save your work.
credit: Bet_Noire/iStock/Getty Images

Using the Command Line

Step

Press "Windows-X" to expand the Power User menu in Windows 8.1 and then click "Command Prompt (Admin)" to launch the Command Line tool with elevated privileges. You must be logged in as an administrator to use it.

Step

Type "shutdown /s /t time_in_seconds" (without the quotation marks) into the Command Line tool. The /s parameter initiates the shutdown and the /t parameter tells the program the time-out period before shutdown.

Step

Replace the "time_in_seconds" parameter with the number of seconds and press "Enter" to execute the command. For example, to turn off the computer after two hours, you would run the "shutdown /s /t 7200" command using the Command Line tool. To shut down the PC immediately, run the "shutdown /s /t 0" command.

Using the Task Scheduler

Step

Press "Windows-X" to display the Power User menu and click "Control Panel" to open it. Click the "System and Security" link and then the "Administrative Tools" link. Double-click the "Task Scheduler" shortcut to launch the utility.

Step

Click "Create a Task" in the Actions pane to display the Create Task window. Type a name for your new task -- "Shutdown task" for example -- into the "Name" field. Click the "Run whether user is logged on or not" radio button to ensure the shutdown occurs even if the user is not logged on.

Step

Click the "Triggers" tab and then click the "New" button to create a new trigger. Ensure that "On a schedule" is selected from the "Begin the task" drop-down menu. Click the "One time" radio button if you don't want a recurring task; otherwise, click "Daily," "Weekly" or "Monthly." Choose the start date and time from the "Start" boxes. Check the "Enabled" box to enable the task as soon as you create it. To stop the task automatically after a specified period of time, check the "Expire" box and choose the date and time. Click "OK" to save the trigger.

Step

Click the "Actions" tab and then click the "New" button to create a new action. Ensure the "Start a program" option is selected from the "Action" drop-down box. Type "shutdown.exe" (without the quotes) into the "Program/script" field and then type "/s /f" (without the quotes) into the "Add arguments (optional)" field. Click "OK" to save the action.

Step

Click "OK" to save the task. The task appears in the Active Tasks section of the Task Scheduler Summary pane.