How To Restart Or Shut Down Windows After Certain Time

As an Amazon Associate and affiliate of other programs, I earn from qualifying purchases.

In many situations, you might look to shutdown Windows PC after a certain time. For instance, after music finishes or after the update of the software is completed. For this, you can schedule the auto shutdown very easily in Windows. Also, it is recommended to shut down instead of hibernating as there are some disadvantages of hibernating a Windows PC. So, this article will take you through ways to automatically shut down Windows after a specific time interval.

You can use these methods in Windows 7, 8 or 10 without any issues.

Ways To Automatically Shutdown Windows After Specific Time

1. Using Command Prompt

1. Open Command prompt.

2. Type the below command line:

shutdown -s -t XXXX

Here the XXXX is the time in seconds. So the only effort you have to make is to convert hours/minutes into seconds to make the laptop/PC shutdown after that specific time. For example: if you want to shut down the system after 1 hour then you can write the command as shutdown -s -t 3600.

command to automatically shutdown windows after specific time

3. Next, press enter. The timer will start and will make the computer shut down after XXXX seconds. You might also see a message that when your PC/laptop will shut down as shown in the screenshot.PC will turn off automatically

How To Cancel Auto Shutdown

If you come across an important work on your laptop/PC and you want to cancel the timer you have set for the shutdown, then you can easily do it with just one command line.

Open Command Prompt and type in shutdown -a to cancel the timer.

cancel auto shutdown

Restart PC After Specific Amount Of Time

The method is same, you can use the same command line for the restart which you used for the shutdown. Just replace ‘s’ with ‘r’ letter and press enter. Here is how the command line will look like.

shutdown -r -t XXXX

Here also the XXXX is the time in seconds.

2. Create Shortcut To Automatically Shutdown Or Restart

If you frequently need this feature then you can create a shortcut.

By creating a shortcut you will not need to write the commands again and again. Below are the steps to create the shutdown and restart shortcuts.

1. Right click on Desktop and navigate to New->Shortcut.

create shortcut in Windows

2. A window will open where you need to type in the command for shutdown or restart as shown in the screenshot below.

create shortcut for auto shutdown or restart

3. After this, click on Next button and give some appropriate name to the shortcut. Like Shutdown after 1 hour and click on the Finish button.name for shortcut

From next time onwards you just need to double click to start the timer for the shutdown.

Tip: You can create multiple shortcuts with different timers as per your requirements for easy and quick access.

Want To Change The Time Of The Shutdown Timer?

1) Right-click on the shortcut you have created and click on Properties.

2) In the Target field, you can change the time. Next, click on Apply.change timer for auto shutdown shortcut

So anytime you want to make changes in the timer, you can easily do it from shortcut properties.

Similarly, you can create a shortcut to cancel the timer by creating a shortcut icon with target field having shutdown -a command line.

Also Read: How To Change Low Battery Notification On Windows

3. Using Notepad Or Batch File

In this method, we will again be using some commands to create scheduled time and then save them as a batch file using Notepad. It is somewhat similar to the above method, but with a different command.

1. Open notepad and type the given command.

@echo off
:W
if %time%==17:00:00.00 goto :X
goto :W
:X
shutdown.exe /s /f /t 60 /c “Time To Go”.

Here %time%==17:00:00.00 is the time you want the PC to turn off. The time is in 24 Hrs format with HH:MM:SS: MS and “Time To Go” is the message that will be displayed when the time is about to come. You can also change as you wish.

2. After this, click on File and select Save as.

create .bat file to enable auto shutdown

3. Now, from Save as type select All Types. Then name the file and add .bat at the end and click on Save.

turn off PC automatically using BAT file

4. This will save the created batch file. Double click on it and a blank command prompt will open. Keep it opened until you are working on the PC as it will keep track of the real time and the time after which it has to shut down the PC.

As the time of shutdown comes near, it will notify you about the same and will turn off the PC in approximately 1 minute.

Below we have handpicked other Windows tutorials that might also be useful for you.

Conclusion

After following the above methods your PC will shut down automatically after/at the time you have set on any version of Windows you are using be it 7, 8 or 10. The only difference is that in the first two methods we are setting a timer while in the last one we are inputting the exact time it has to shut down.  If you come across any issues while performing the steps, then you can let us know in the comments.

Photo of author

Akshay Thapliyal

Akshay Thapliyal is the co-founder of TechUntold and mainly looks into strategic planning at TechUntold. He also loves writing articles on apps & problems he faces related to tech. Follow him on Twitter.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.