You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Scheduling Mac to shutdown and start up

Hello everyone!


I work in a college. We have around 40 Macs in two classrooms. One room of Mac studios and another with iMacs. All our Macs have been updated to Sonoma.


Previously to Sonoma and Ventura, all our Macs were scheduled to shut down at 18:00, and start up at 08:00. This was very useful to have in a college considering some students forget to log out and some shut down their Macs rather than logging out. The shutdown was helpful and would give us fresh Macs every morning, not having to go around every day doing it all manually.


Since we've updated our systems, of course as many are aware, the shut down and startup schedules were wiped since there is no longer an option to do it via system settings.


I had a good look online and found apple giving a solution which is to use terminal.


I managed to prepare two codes which I used on every single Mac :


sudo pmset repeat shutdown MTWRFSU 18:00:00


sudo pmset repeat poweron MTWRFSU 08:00:00


This is amazing as I was able to save them on a usb and just copy and paste on all 40 Macs.


Soon one problem I've realised, and also checking via : pmset -g sched

is that the Macs are only able to register one command only.


To clarify, if I set the shutdown schedule code, and then follow it with the startup code, the startup code seems to wipe the shutdown code. and the other way round.


So in other words the Macs are only able to either start up on schedule, or shutdown on schedule, not both.


For the time being I resorted to a restart code : sudo pmset repeat restart MTWRFSU 06:00:00

to at least log everyone out who forgot to the night before.


It did the trick for now, but unfortunately it's not perfect. We would definitely benefit from having a shutdown and startup schedule on a daily basis. For like I said, reset purposes, and also less power consumption.


Could someone advise me on any options, or maybe my codes are wrong? Maybe there's a schedule that can be created for both commands?


Your help and advice would really be appreciated.

iMac 27″, macOS 14.1

Posted on Nov 23, 2023 12:16 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 23, 2023 8:11 AM

aaronbalitsky wrote:

the Macs are only able to register one command only.

To clarify, if I set the shutdown schedule code, and then follow it with the startup code, the startup code seems to wipe the shutdown code. and the other way round.

So in other words the Macs are only able to either start up on schedule, or shutdown on schedule, not both.



Note —that you may only have one pair of repeating events scheduled


needs to be on one line—

ex

sudo pmset repeat poweron MTWRFSU 6:00:00 shutdown MTWRFSU 21:30:00




ref: Schedule your Mac to turn on or off in Terminal - Apple Support



Similar questions

13 replies
Question marked as Top-ranking reply

Nov 23, 2023 8:11 AM in response to aaronbalitsky

aaronbalitsky wrote:

the Macs are only able to register one command only.

To clarify, if I set the shutdown schedule code, and then follow it with the startup code, the startup code seems to wipe the shutdown code. and the other way round.

So in other words the Macs are only able to either start up on schedule, or shutdown on schedule, not both.



Note —that you may only have one pair of repeating events scheduled


needs to be on one line—

ex

sudo pmset repeat poweron MTWRFSU 6:00:00 shutdown MTWRFSU 21:30:00




ref: Schedule your Mac to turn on or off in Terminal - Apple Support



Dec 4, 2023 6:19 PM in response to leroydouglas

It's indeed strange that Apple inexplicably removed the GUI for scheduling Sleep, Wake from

Sleep/Start Up, and Shutdown – forcing users to do it via the Terminal.


But the free and for many years trusted system helper ONYX (again, it's free) has added the capability in the app with a nice, simple GUI under the section UTILITIES / Scheduling.

Jun 19, 2024 1:29 PM in response to brianna41

brianna41 wrote:

Here is a command that Wakes or powers on and shuts down the Mac at 6AM and 6PM for example - you just have to enter the command all at once so it does not null the previous command

sudo pmset repeat wakeorpoweron MTWRFSU 06:00 shutdown MTWRFSU 18:00


this is what was posted above... but you have to read the thread and sort oldest to newest if you want to make sense of it, and not repeat what was already posted.

May 16, 2024 4:26 PM in response to leroydouglas

I am trying to Shutdown and Start Up my Mini OS Mac Sonoma 16 may 2024 using OnyX . I set the schedule but it doesn't seem to work.

From others posts I learned that using Terminal only allows one command. If you put a second command it wipes out the one before

So this is what I have done (let's se if it works)

I use SuperDuper as my Back up app. It is really great, if you have not tried it, give it a try.

It gives me the option to shut down my Mac after the backup is complete.I have set the backup to start at 10:00p.m. and it works. Now all I have done is put a command in Terminal to Start Up .

sudo pmset repeat poweron MTWRFSU 6:00:00

No other Terminal command. so the shutdown command is not overwritten.

I am going to try this tonight. 16 May 2024,lets see if this works.Tomorrow morning Nothing should be overwritten/wiped out

If any of you have any feed back please post it. OR send me Mail at ranjit@amlic.com. And a final thought. I installed onyX and set up the schedule for two weeks, I set onyX to shutdown at 10:00 and startup at 6:00am. and watched last night, but onyX did not execute. No shutdown No startup. Super Duper did complete and did shut down my Mini Sonoma.So I am hoping the terminal command to Start Up works tomorrow 17 May 2024

Cheers

Ranjit


Scheduling Mac to shutdown and start up

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.