How to set shutdown or restart timer in Windows
I’m sure that at least once you faced the situation when you would need to set a shutdown or restart timer on your Windows PC while being out of reach. This may have happened because you left some huge application to download overnight or maybe you have some background job on your office PC and policy requires to shut it down when no one works on it. The timer will also help to restart a virtual machine or a remote computer, making sure that no other program will interrupt the process due to “save changes” dialogs. Well, the reasons may be different but the solution is the same.
There are two ways to initiate a delayed shutdown or restart – manually by means of command prompt or automatically by creating a shortcut that requires just a double click to fire.
For the first scenario, open the command prompt – press the combination of Windows + R, type in cmd and click OK.
Let’s say that you type in shutdown -s -f -t 120 to the command prompt here and click enter. This will initiate system shutdown (-s) in 120 seconds (-t 120) and all dialog windows like “save changes” dialogs will be ignored (-f). The sequence here does matter. If you would like just to logout your user in 10 minutes without force closing other windows, it will look like shutdown -l -t 600. If you want to restart your remote computer just right away no matter what programs are running there, the command will look like shutdown -r -f -t 0. This is the basics, just combine the operators according to your needs to get the desired result. And one more useful command here, in case you initiated the delayed shutdows by mistake, – shutdown -a will abort the timer.
All these commands can also be converted to a shortcut or a button for quick initiation. I personally have a force restart shortcut on all my computers and virtual machines on Windows, that I access remotely. So, to create such a shortcut, right click on some free space on the desktop and choose.
Then type in the name of the program that is shutdown.exe and add desired operators, like we did above – like -r -f -t 60.
Click Next and name the shortcut like Force Restart, or choose any other and click Finish.
That’s it! Now, if you double click on the icon, Windows will initiate a minute countdown for your restart. No need to do that right now, unless you remember how to abort the timer and can do that within 60 seconds=)
- Posted by Author
- On July 20, 2016
- 0 Comments