How to Program PC to Shut Down by itself in Windows, Mac and linux

How many times do we end up sleeping, waiting for a download to finish and not want to leave the computer on all night? The act of programming the computer to turn itself off without the interference of the user can be very important to avoid surprises in the account of light, besides increasing the life of our devices.

Exactly why, the all three main operating systems for computers ( WindowsMacOS and Linux ) rely on native self- powering tools (through scheduling), and with a few simple steps you can program the PC or Mac to shut down, all alone and without interference.

How to program the PC to shut down (Windows)

Windows has only one command to program the automatic shutdown, but two ways to use it. It can usually only be used once, but with a few extra steps you can create a permanent rule so that the system is always shut down at the same time.

1. By programming manually

The simplest and most practical method of scheduling Windows shutdown is by doing it manually, through the Command Prompt system; however, the procedure is unique and should be repeated every time.

  1. In Windows 8 and 10, type cmd in the search field and hit enter; in other versions of Windows, click Start, Run, type cmd, and then press Enter;
  2.  Type the command shutdown -s -f -t * time in seconds for shutdown *, and hit Enter; for example, to schedule shutdown in one hour, type shutdown -s -f -t 3600;
  3. Windows will display a message, notifying you of the scheduled shutdown.

And ready.

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

2. Creating a routine with Task Scheduler

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

  1. In Windows 8 and 10, type Schedule Tasks and press Enter; in other versions, you can also find it in the Administrative Tools of the Control Panel;
  2. From the Actions menu on the right, click Create Basic Task;
  3. 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 Shutdown; click Next;
  4. In the Task trigger, choose how you want the function to fire. For a recurring option, choose Daily, and click Next;
  5. Choose a day and time for the task to be run for the first time, and set the interval of days for it to be repeated. If you want it to turn off the computer daily, type 1. Click Next;
  6. On the next screen, select Start a program and click Next;
  7. In the Program/script field, type shutdown -s -f, and then click Finish.

And that’s it.

How to Program the MacOS to Shut Down

In macOS, the process to schedule the shutdown does not require any type of command in the Terminal; everything can be done very simply:

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

And ready. With this, the macOS will always be turned off at the same time.

How to program the PC to shut down (Linux)

Linux also has a Shutdown command to program the shutdown of the system, 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 with the Ctrl + Alt + T keys );
  2. Enter the command sudo shutdown -h + * time in minutes *, to tell the system to shutdown within the given time; for example, sudo shutdown -h +120 to shutdown in two hours. Press Enter;
  3. enter your system password (if Linux asks for it) and hit Enter.

And ready.

You can also schedule the shutdown for a specific time by typing 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 the Terminal and press Enter. As with Windows, the command refers to only one shutdown.

Leave a Comment