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 Fix Error 0xc00007b “Application was unable to start correctly”
- How to Reset Software Trial version
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.
- Open CMD: Press “Win+R” to open Run, type cmd and click “ OK ” to open Command Prompt;
- 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 ;
- 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 :
- Open Task Scheduler: Press “Win+R” to open Run, type taskschd.msc and click “ OK ” to open Task Scheduler.
- 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 ;
- Configure the task: In Task Launcher, choose how you want the function to be triggered. For a periodic option, choose daily, and click Next;
- 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;
- 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:
- Click on the Apple Menu, and then on System Preferences ;
- On the Hardware menu, click Energy Saver ;
- Click on the Schedule button, located at the bottom right of the window;
- 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:
- Open the Linux Terminal (depending on the version, it can be found in the Accessories menu or opened using the Ctrl + Alt + T keys );
- 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;
- 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.