Create Shutdown Timer In Windows With One Command
Assalam-0-Alaikum! Welcome to Programming Concepts.
Let's say you are copying some files in your computer and waiting it to finish so you can turn your computer off. But why waiting, when you can automate it with just one command.
Here's how you can do this.
Open Command Prompt
In Windows 10 go to your search box in Taskbar and search "cmd". Then launch Command Prompt by pressing Enter key or Clicking the Open button as shown in the picture below.
Insert Shutdown Command
In Command Prompt window type following command (as shown) and press Enter key.shutdown -s -t 60
Orshutdown /s /t 60
Both syntaxes work fine.

You may receive a message box as shown in above image.
Let me describe each segment of this command.
shutdown: It is the name of command to be executed.
-s or /s: It denotes that we want to shutdown the computer. For restarting the computer you can replace it with "-r" or "/r" and for logging off you can replace it with "-l" or "/l".
-t or /t: It denotes time after which you want your computer to be turned off. It takes time in seconds. Here 60 represents 1 minute. You can change it accordingly.
To Abort this shutdown. Type following command and press Enter key.
shutdown /a
Here /a denotes "Abort".
To know more about shutdown command. Run following command in Command Prompt.
Here /a denotes "Abort".
To know more about shutdown command. Run following command in Command Prompt.
shutdown ?
You'll find a long list of options and their usage
as shown below.
Comments
Post a Comment