Do you want to be able to shutdown/restart/log off your Windows PC or schedule the shutdown/restart of your computer with a double-click of the mouse? Then this tutorial is the right place for you to learn how to do so. Here, we shall tell you how you can make your PC shutdown/restart/log off at your desired time quite easily. In other words, we’ll show you how to schedule Windows shutdown, restart or log off.
How to Schedule Windows Shutdown, Restart or Log Off
All you need to do is to create a text file using Notepad, put one of the following sets of commands in it and save it with the extension .bat. Or you could download the files: shutdown.bat, restart.bat, logoff.bat.
Commands for Scheduling Shutdown/Instant Shutdown
shutdown.exe /s /t 30
The “30” in the last line refers to the time interval (in seconds) after which you wish the computer to shutdown. You can change it to any number between 0-315360000 (including 0 and 315360000). The default value is 30.
Commands for Scheduling Restart/Instant Restart
shutdown.exe /r /t 30
Commands for Instant Log off
After creating the file for the task you need to perform, you just have to double click the .bat file and VOILA! Your desired task will be performed instantly or scheduled for a later time (depending upon the code).
For example, when you double-click shutdown.bat, Windows shows a message similar to the following one :
Note : These three set of commands are to be put in three different files, and you may double-click one of those files depending upon whether you need to shutdown, restart or logoff.