How to Use macOS pmset Command to Schedule Power Events

While you can use the graphical System Settings to tell your Mac when to turn off its display or go to sleep, those settings are limited. If you manage a fleet of iMacs in a school computer lab, you might want them to automatically boot up at 7:00 AM before students arrive, and definitively shut down at 8:00 PM to save electricity. To achieve this level of granular, scheduled power management, you must use the hidden macOS command-line utility: pmset (Power Management Settings).

Understanding pmset

The pmset command interacts directly with the Mac’s System Management Controller (SMC). Because it modifies hardware-level power states, almost all pmset commands must be run with sudo (administrator privileges).

Step 1: View Current Power Settings

Before making changes, it is wise to view your current configuration. Open the Terminal and run:

pmset -g

This outputs the active power management profile. You will see values for displaysleep, disksleep, and sleep (all measured in minutes). A value of 0 means the feature is disabled (e.g., the display will never sleep).

To view any currently scheduled power events (like a pending wake or shut down), run:

pmset -g sched

Step 2: Schedule a Recurring Boot or Wake Event

To schedule events, you use the repeat flag. You must specify the type of event, the days of the week, and the time (in 24-hour HH:MM:SS format).

  • wake: Wakes the machine from sleep.
  • poweron: Boots the machine from a fully shut down state.
  • wakeorpoweron: The most reliable option; it boots the machine if it is off, or wakes it if it is sleeping.

The days of the week are abbreviated: M, T, W, R, F, S, U (U is for Sunday, R is for Thursday).

To schedule the Mac to wake up or turn on every Monday through Friday at 7:30 AM, run:

sudo pmset repeat wakeorpoweron MTWRF 07:30:00

Step 3: Schedule a Recurring Shut Down Event

You can use the same logic to force the computer to turn off. The event types are sleep, restart, or shutdown.

To force the Mac to shut down completely every Friday evening at 8:00 PM (20:00):

sudo pmset repeat shutdown F 20:00:00

Step 4: Combining Events (The Overwrite Rule)

This is the most critical rule of pmset: You cannot run multiple `pmset repeat` commands sequentially. Each new `pmset repeat` command completely overwrites the previous one.

If you want a Mac to turn on every morning and shut down every night, you must combine both events into a single command.

sudo pmset repeat wakeorpoweron MTWRF 07:30:00 shutdown MTWRF 20:00:00

This single line writes both the wake and the shutdown schedules into the SMC simultaneously.

Step 5: Canceling Scheduled Events

If the computer lab is closed for the summer and you want to prevent the Macs from turning on automatically, you must clear the schedule.

sudo pmset repeat cancel

You can verify the schedule has been cleared by running pmset -g sched again. The output should confirm that no events are scheduled, returning manual power control to the user.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.