If you’ve been following us for a while, then you’ve probably noticed that in addition to keeping you informed, we’re always trying to add more knowledge to your everyday life, with tips and tutorials so you can get the most out of your devices and apps.
Today, continuing this routine, we present another tip; this time, for Mac users! Check below how to program your Apple computer to turn on or off on days and times.
Whether to adapt to a certain work routine, or to “clean” the RAM memory or apply the details of an update, being able to program your computer to turn on or off at certain times can be a powerful ally in your day to day.
With the reformulation of the Settings panel that arrived with macOS Ventura, Apple removed the option that allowed you to easily program the desired routine. However, it is still possible to do it – quite simply – through the Terminal.
For those who haven’t updated to the most current version of the system yet and would like to perform the configuration through the Settings menu, just check the last section of this tutorial. For those who are already on Ventura or prefer to use the Terminal, check out the instructions below:
- Open the Terminal app;
- You can find it in “Apps” > “Utilities” > “Terminal” or via Spotlight Search (Cmd + Spacebar) by typing “Terminal”.
- Check out the following categories to better understand the command you’ll give the computer through Terminal;
- Type the desired command and press Enter. If necessary, enter your password to confirm.
The “pmset” command
Now, you will need to use the command pmset
along with some attributes to program the computer to turn on or off. But calm down, we will present and explain the main attributes for you to be able to program your routine right after.
But attention! Your Mac must be awake and logged in for it to shut down at the scheduled time. If it is not connected or if it is sleeping, it will not turn off.
Also, if you have any documents open with unsaved changes, your Mac might not go to sleep or shut down at the designated time.
Attributes
You can check the complete documentation of the command pmset
along with its attributes by clicking here.
Check out some important attributes:
sudo
: to run the command as system administrator;schedule
: Allows you to schedule the system to sleep, shut down, wake up, and/or turn on;sleep
: for the computer to rest;shutdown
: for the computer to shut down;wake
: for the computer to wake up;poweron
: for the computer to turn on;repeat
: to set daily or weekly events;cancel
: cancels a certain schedule;
In addition to these attributes, you also need to know how the days of the week should be represented, the format of dates and times:
M
: Monday (Monday);T
: Tuesday (Tuesday);W
: Wednesday (Wednesday);R
: Thursday (Thursday);F
: Friday (Friday);S
: Saturday (Saturday);U
: Sunday (Sunday);- Dates: must be in the format MM/dd/yy (month/day/year);
- Hours: hh:mm:ss (hours:minutes:seconds).
Examples
This all sounds pretty complicated, doesn’t it? But it’s actually quite simple!
Using the attributes described above along with the aforementioned pmset
, we will give some examples of commands with the description of what each one of them is capable of doing. Feel free to copy them, changing only the attributes you need.
The command will wake up the computer on July 7, 2023 at 8 pm:
sudo pmset schedule wake "07/04/23 20:00:00"
The command will put the computer to sleep on March 25, 2027 at 2:00 pm:
sudo pmset schedule sleep "03/25/27 14:00:00"
The command will cause the computer to shut down at 11 am from Tuesday to Saturday:
sudo pmset repeat shutdown TWRFS 11:00:00
The command will cancel all existing schedules:
sudo pmset repeat cancel
Now that you know how to write the necessary command to perform the schedule, write it in Terminal and press Enter. Type your password and press Enter once more to confirm.
If you’re on an earlier version of macOS and don’t want to or can’t upgrade – or simply prefer not to use Terminal, you can schedule through the following menus.
For Apple notebooks (MacBook Air, MacBook Pro and MacBook):
- Click on the apple icon located in the upper left corner of the screen;
- Click in “System Preferences”;
- Click in “Battery” and then in “scheduling”;
- Perform the programming as you see fit.
Your Mac must be awake and logged in for it to shut down at the scheduled time. If it is not connected or if it is sleeping, it will not turn off.
Also, if you have any documents open with unsaved changes, your Mac might not go to sleep or shut down at the designated time.
For Apple desktops (iMac, Mac mini, Mac Studio and Mac Pro):
- Click on the apple icon located in the upper left corner of the screen;
- Click in “System Preferences”;
- Click in “Energy saving” and then in “scheduling”;
- Perform the programming as you see fit.
Your Mac must be awake and logged in for it to shut down at the scheduled time. If it is not connected or if it is sleeping, it will not turn off.
Also, if you have any documents open with unsaved changes, your Mac might not go to sleep or shut down at the designated time.