Apple has some pretty nice energy savings options built into macOS. Most of these options are tucked nicely inside of the Energy Saver pane of System Preferences.

Energy Saver Panel

The above settings get written to the preference and looks like:

defaults read /Library/Preferences/SystemConfiguration/
    RepeatingPowerOff =     {
        eventtype = shutdown;
        time = 1020;
        weekdays = 127;
    RepeatingPowerOn =     {
        eventtype = wakepoweron;
        time = 420;
        weekdays = 31;


Some of these values are a bit opaque once they are written to the preferences domain. For example, when you set the Every Day option in the above screenshot this value is written in the weekdays key with a value of 127. So what does that value actually refer to? Each day gets a value starting from one that doubles with each passing day.

Weekdays values

  1 - Monday
  2 - Tuesday
  4 - Wednesday
  8 - Thursday
  16 - Friday
  32 - Saturday
  64 - Sunday

To select every day of the week you add all of the values together: 1+2+4+8+16+32+64 = 127. While weekdays would be: 1+2+4+8+16 = 31. The math is quite simple but easy to forget that this specific aspect of the system starts the day on Monday.


The time value is configured as time after 00:00, or midnight, in seconds. Examples below:

4 am
  60m x 4h = 240s

1:30 pm
  60m x 13.5h = 810s

5:00 pm
  60m x 17h = 1020s


If you have gotten this far you might be wondering why any of the information above matters? If you have ever needed to create a configuration profile for Energy Saver, understanding these values allow you to customize the options without having to use a GUI like Profile Manager.


For a full profile example check out Nick McSpadden’s EnergySaver.mobileconfig. Note: Nick’s profile contains other energy saver options that you will likely want to include and/or modify.


The RepeatingPowerOff > eventtype string actually accepts three types: restart, sleep, and shutdown. Unfortunately the system will only read one RepeatingPowerOff dict. That means you are unable to get creative and say restart Monday-Friday at 8pm and shutdown Saturday-Sunday at 3pm.

OS X Yosemite: Schedule a time for your Mac to turn on or off or go to sleep,
OS X: Setting a startup or shut down time,