Archive for February 29, 2016

Using pmset on OS X to schedule restarting your Mac

February 29, 2016 2 comments

OS X’s pmset command line tool is designed to control power management settings on your Mac, but it also has various options for scheduling your Mac to perform various actions at set times using the following format:

pmset repeat type weekdays time

The various types documented in pmset’s man page are as follows:

  • sleep – puts the Mac to sleep
  • wake – wakes the Mac from sleep
  • poweron – starts up the Mac if the Mac is powered off
  • shutdown – shuts down the Mac
  • wakeorpoweron – depending on if the Mac is off or asleep, the Mac will wake or start up as needed

The weekday options are as follows:

  • M = Monday
  • T = Tuesday
  • W = Wednesday
  • R = Thursday
  • F = Friday
  • S = Saturday
  • U = Sunday

The time option documented in the man page is as follows:

  • HH:mm:ss

The time must be set in 24 hour format, with a leading zero for numbers less than 10.

Examples of this would be:

4:00 AM = 04:00:00
1:00 PM = 13:00:00
12:00 AM (midnight) = 00:00:00

These options all match what shows up in the Energy Saver preference pane’s scheduling options, with one exception. There is a Restart option in the Energy Saver settings which doesn’t appear to have a documented type in the pmset man page.

Screen Shot 2016 02 26 at 10 23 05 PM


The answer turns out to be that there is a undocumented restart type which is not listed on the pmset man page. For more information, see below the jump.

Read more…

%d bloggers like this: