HomeTechHow toHow to program the PC to shut down by itself

How to program the PC to shut down by itself

The act of programming the device to turn off can be very important to avoid surprises in the light bill, in addition to increasing the life of our devices. So, see below, how to program the PC to turn off by itself using the computer’s own native tools.

How to program the PC to shut down by itself

1. Programming manually

The simplest and most practical method of how to program the PC to shut down is doing it manually, through the system’s Command Prompt; however, the procedure is unique and must be repeated each time.

  1. Open CMD: Press “Win+R” to open Run, type cmd and click “ OK ” to open Command Prompt;
  2. Type the command shutdown -s -f -t time in seconds to shutdown*, and press Enter; for example, to schedule shutdown in one hour, type shutdown -s -f -t 3600 ;
  3. Windows will display a message warning of the scheduled shutdown.

If you want to cancel the shutdown, type shutdown -a in Command Prompt and press Enter; Windows will display a new message notifying you of the cancellation.

2. Creating a routine with the Task Scheduler

For those who want Windows to maintain a periodic shutdown routine, it is possible to do so by creating a routine, through the Task Scheduler tool :

  1. Open Task Scheduler: Press “Win+R” to open Run, type taskschd.msc and click “ OK ” to open Task Scheduler.
  2. From the Actions menu on the right, click Create Basic Task. The wizard will offer options to include a name and description for the task. Choose one that has to do with what you want to do, in this case, something like Auto Power Off; click Next ;
  3. Configure the task: In Task Launcher, choose how you want the function to be triggered. For a periodic option, choose daily, and click Next;
  4. Choose a day and time for the task to run for the first time, and set the interval of days in which it should be repeated. If you want her to turn off the computer daily, type 1. Click Next;
  5. On the next screen, select Start a program and click Next. In the Program/script field, type shutdown -s -f and click Finish.

How to program macOS to shut down

On macOS, the process to schedule shutdown does not require any commands in Terminal; Everything can be done very simply:

  1. Click on the Apple Menu, and then on System Preferences ;
  2. On the Hardware menu, click Energy Saver ;
  3. Click on the Schedule button, located at the bottom right of the window;
  4. In the menu shown, check the second box, select Shutdown, set a period for the shutdown to be repeated (whether every day, only weekdays, only weekends or only a specific day of the week), set the time and click OK.

With this, macOS will always shut down at the same time.

How to Program Linux to Shut Down

Linux also has a Shutdown command to schedule a system shutdown, but the parameters are different from those used in Windows:

  1. Open the Linux Terminal (depending on the version, it can be found in the Accessories menu or opened using the Ctrl + Alt + T keys );
  2. Type the command sudo shutdown -h +time in minutes, to tell the system to shut down within the given time; eg sudo shutdown -h +120 to shut down in two hours. Press Enter;
  3. enter your system password (if Linux asks for it) and press Enter.

It is also possible to schedule the shutdown for a specific time, just type it in place of +time in minutes. For example, if you want to shut down the system at 3:30 pm, type sudo shutdown -h 15:30.

To cancel the schedule, type shutdown -c in Terminal and hit Enter. As with Windows, the command is for just one shutdown.

George Philip
George Philiphttp://betechwise.com
A tech savvy specialized in mobile devices, computers and consumer technology, as well as software and applications. He has been writing about tech since 2019 and he explains all technological concepts so that users with less knowledge can understand them. Reach him at [email protected]
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here