Turn off Mac on a schedule by using pmset

In previous versions of macOS, system settings may allow you to start and/or shut down your Mac at a specific time. This option has disappeared in the system settings, but you can still take advantage of it using macOS Terminal and pmset.

With the pmset (power management settings) command, you can ensure that your Mac starts every weekday at 08:55, for example. So that you can get started immediately after arrival, if you want, of course…

Turn off Mac on a schedule by using pmset

Using the pmset command under macOS Terminal

Using the pmset command, you can schedule your Mac to automatically shut down, restart, hibernate, and wake up.

You can use the pmset command to set a schedule:

Copy
$ sudo pmset repeat [actie] [weekdagen] [tijd]

The parameters [actie] [weekdagen] and [tijd] use as follows:

[actie] ▸ Specify which action you want to perform: drag (hibernate), wake (waking up from sleep), poweron (booting), shutdown (close) or wakeorpoweron (automatically wake up from sleep mode or start up based on the current condition).

[weekdagen] ▸ For weekdays you can use MTWRFSU or any combination of days you want to use. For example, you can use the combination MWF for Monday, Wednesday and Friday.

[tijd] ▸ Here you enter the time at which the action should be carried out in the 24-hour format (HH:mm:ss).

Do you want to use your Mac every Monday, Wednesday and Friday (MWF) at 08:55 startup (wakeorpoweron) then you can set that with:

Copy
$ sudo pmset repeat wakeorpoweron MWF 08:55:00

Overview of scheduled pmset actions

If you want to see which pmset schedules are active or want to check a newly added action, you can do so by selecting the option -g shed to use in pmset command.

Copy
$ pmset -g shed

After executing the command, you will see an overview of all scheduled actions.

Undo scheduled pmset actions

If you want to delete the scheduled tasks, you can select the option cancel use in the pmset command. The command you should then use looks like this:

Copy
$ sudo pmset repeat cancel

Recent Articles

Related Stories