How to Set a Shutdown Timer In Windows
Tags: testing, test, tutorial, beginners
Published: 2021-09-12 07:46:56

Read this article on how to set a shutdown timer for a computer, how to configure it or create a shortcut.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ikv4rbqrxux9z7087ml.jpg)

In today’s tutorial, we will show you how to configure a shutdown timer using the functionality of the Windows operating system. If, for some reason, you don’t want to use the integrated functions of your Windows, there are lots of similar third-party apps that can be downloaded from the Internet. They offer improved graphical interface and extra features, such as the option to log off, turn on the sleep mode, set the exact idle time interval for shutting down or logging off and more. The sequence of steps for all applications is very similar and user-friendly, so you shouldn’t have any difficulties in doing everything right on the first try.

##Set the timer with the Command Prompt
This is an all-inclusive method that work for all versions of Windows, from Windows 7 and to the latest builds of Windows 10. It involves using the functionality behind the command shutdown, which can turn off or restart a computer automatically after a set period of time.

To create a shutdown timer manually, open the Run dialogue box. You can use any of the four methods described below:

Method 1. Click on the Start button in the lower left corner of your desktop, on the Taskbar and open the main Windows menu. You will see the list of installed programs and applications; drag the scroll bar to find the group Windows System and open the nested menu to select Run.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwfo4niddsv9rkfeblwi.jpg)

Click on the Start button in the lower left corner of your desktop, on the Taskbar and open the main Windows menu. You will see the list of installed programs and applications; drag the scroll bar to find the group Windows System and open the nested menu to select Run.

In the Command Prompt window, type the command shutdown -s -t XXXX. The value XXXX denotes the time (in seconds) before the computer should be powered off. For example, if you want the computer to be turned off in 2 hours, the command should look like this: shutdown -s -t 7200. Click ОК or press Enter on your keyboard to perform this command.

At once, Windows will show warning on the screen: You are about to be signed out. Windows will shut down in 120 min. Shutdown will start on ________. When the time is up, all programs will be closed, and the computer will be powered off.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zr4clmnx3pp2myzz06tx.jpg)

When the shutdown time period is less than ten minutes (600) seconds, the warning will be shown on the desktop. For example, when you enter the command “shutdown -s -t 600”, you will see such a message.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x20lp44kz6gviow1mks5.jpg)

If you need to restart the computer after a certain period of time, open the Run window and type the command shutdown -r -t XXXX, replacing the value -s with -r.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/soqmowthwusjdkndc08r.jpg)

Replace the value XXXX with the exact time in seconds after which you need the operating system to restart. Click ОК or press Enter on your keyboard to perform this command. The pop-up reminder in the Action Center will show you the exact time left before the restart.

To cancel a scheduled shutdown, open the Run app again and type the command shutdown -a. Click ОК or press Enter on your keyboard to perform this command.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9mt7ct0yppxs7l08kl6.jpg)

When the command shutdown -a is performed, the Action Center will flash a warning: Logoff is cancelled. The scheduled shutdown has been cancelled.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7cnnmdwhxhmnb4i55vaa.jpg)

Create a shortcut for shutdown timer
If you are going to use the shutdown timer regularly, and opening the Command Prompt every time seems a nuisance, you can create a desktop shortcut for such shutdown timer.

Right-click on an empty area of your desktop, and click New in the nested menu that appears, then select Shortcut.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a27dmxn0x1rehgfbrxqt.jpg)