How to schedule automatic shutdown of your PC

Surely you have ever wondered how to program the automatic shutdown of your PC. It is true that in Windows we have the option of automatically suspending the computer as often as we choose, between one minute and 5 hours, or turning off the screen, but keeping the computer running. However, what about the automatic shutdown?

Sleep is nothing more or less than keeping the computer in a low power state , which can be interesting if, for example, something unforeseen comes up and you have to leave your workstation for a couple of hours, but you have so many applications and open documents, which makes you lazy to save everything and turn off.

However, if you are one of those who put on a Netflix movie or series before going to bed, then it is advisable to program the computer to turn off automatically and thus reduce energy consumption to a minimum.

Command to schedule Windows automatic shutdown

So how can we schedule the system to turn off by itself at a certain time? Well, very simple: executing a command in the Windows console or in PowerShell.

command to turn off the pc shutdown
  1. Open a “Command Prompt” or “Windows PowerShell” window (you can use the WIN + R shortcut, type cmd or powershell and press the Enter key).
  2. Type and run the command shutdown  -s -t XXXX , where  -s is the shutdown action,  -t  is the timeout for shutdown, and  XXXX is the seconds, in this case 7200, or 2 hours.
  3. You can abort the shutdown at any time with the shutdown -a command .

Create an automatic timer to shut down the PC

A trick to avoid having to execute the previous command every time we want to make the computer turn off by itself is to create a shortcut that executes it by itself , something like a timer. It would be done as follows:

Create a timer to turn off

This way, it’s as simple as double-clicking on the shortcut we just created and you’re good to go. If we regret it and want to override it, we can create another one to override the shutdown.

osky