If you run a Mac Mini as a Plex media server, or you leave an iMac in an office environment, leaving it powered on 24/7 wastes electricity and degrades hardware lifespan. Conversely, shutting it down means it won’t be accessible when you try to remote into it the next morning.
macOS allows you to automate this process, telling the computer to automatically boot up at 8:00 AM and shut down at 6:00 PM. While older versions of macOS had a graphical interface for this in System Preferences, Apple removed it in macOS Ventura and Sonoma.
To schedule your Mac’s power states today, you must use the Terminal and the powerful pmset (power management settings) command. In this guide, you will learn how to automate your Mac’s schedule.
Understanding the pmset Command
The pmset utility interacts directly with your Mac’s power management controller. Because you are modifying system-level behavior, you must use the sudo prefix to grant the command administrative privileges.
The syntax for scheduling follows a strict format for days of the week:
- M: Monday
- T: Tuesday
- W: Wednesday
- R: Thursday
- F: Friday
- S: Saturday
- U: Sunday
You can combine these letters. For example, MTWRF means Monday through Friday (the workweek).
Step 1: Schedule an Automatic Startup (Wake)
To tell your Mac to automatically power on (or wake from sleep) every weekday at 8:30 AM, open the Terminal and type:
sudo pmset repeat wakeorpoweron MTWRF 08:30:00
Press Return. Type your Mac’s administrator password (the cursor will not move) and press Return again. Your Mac will now boot itself every morning.
Step 2: Schedule an Automatic Shutdown (or Sleep)
If you want the Mac to automatically go to sleep every evening at 6:00 PM (18:00 on a 24-hour clock), you must overwrite the previous schedule by passing both commands at the exact same time.
Warning: Running a new pmset repeat command completely erases any previous schedule. You must string them together.
sudo pmset repeat wakeorpoweron MTWRF 08:30:00 sleep MTWRF 18:00:00
If you prefer a hard shutdown instead of sleep, change the word sleep to shutdown:
sudo pmset repeat wakeorpoweron MTWRF 08:30:00 shutdown MTWRF 18:00:00
Step 3: Verify Your Schedule
To confirm that your Mac accepted the schedule and to check what is currently active, use the following command:
pmset -g sched
The terminal will output a block of text detailing your scheduled power events. If you see your times listed, the automation is active.
Step 4: Cancel the Schedule
If you are taking the Mac on a trip or no longer need it to act as a server, you can instantly wipe the entire schedule and return to manual power control.
sudo pmset repeat cancel
By using the pmset command, you can significantly reduce the energy footprint of always-on Mac servers while ensuring they are always available when you actually need them.