Repeating schedule to shutdown and start up

With the latest update, my schedule for my computer to shut down and start up each day has stopped. Poking around, I found the following command to enter in the terminal:


sudo pmset repeat wakeorpoweron MTWRFSU 05:00 shutdown MTWRFSU 23:00


This is what I get when I run it:


Last login: Mon Aug 25 09:06:31 on ttys000




The default interactive shell is now zsh.


To update your account to use zsh, please run `chsh -s /bin/zsh`.


For more details, please visit Page Not Found - Official Apple Support


Bob-2:~ mikegunn$ sudo pmset repeat wakeorpoweron MTWRFSU 05:00 shutdown MTWRFSU 23:00


Password:


Error: badly formatted repeating power event


Usage: pmset <options>


See pmset(1) for details: 'man pmset'


Bob-2:~ mikegunn$ 



What am I doing wrong?

Mac mini

Posted on Aug 25, 2025 09:11 AM

Reply
9 replies

Aug 25, 2025 09:40 AM in response to Mike Gunn

Mike Gunn wrote:

With the latest update, my schedule for my computer to shut down and start up each day has stopped. Poking around, I found the following command to enter in the terminal:

sudo pmset repeat wakeorpoweron MTWRFSU 05:00 shutdown MTWRFSU 23:00





reference:

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



Note —that you may only have one pair of repeating events scheduled, so all on one line


ex

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



To check if these were set:

pmset -g sched


to cancel all repeat:

sudo pmset schedule cancelall



The current stable release of Sequoia including bug fixes, security updates is macOS 15.6.1

Keep your Mac up to date - Apple Support

Keep your Mac up to date - Apple Support


Aug 26, 2025 01:50 AM in response to Mike Gunn

I wrote an Applescript within Automator for use in Sequoia to set wake and shutdown times every day.


I attach the code or if you prefer copy it from the screen shot.

____________________________________


 on run {input, parameters}


 set {Wake_hour, Wake_minute} to words of text returned of (display dialog "Enter Wake time in form hh:mm " default answer "")


set {Shutdown_hour, Shutdown_minute} to words of text returned of (display dialog "Enter Shutdown time in form hh:mm " default answer "")


set Wake_time to Wake_hour & ":" & Wake_minute

set Shutdown_time to Shutdown_hour & ":" & Shutdown_minute


display dialog "Wake time:" & Wake_time & return & "Shutdown: " & Shutdown_time


set User_name to "Add your admin user name" ---  If don't put the administrator's name here then it asks for it on run


set pass_word to " Add in the admin password" --- also need this if you don't want to have to enter it at run time


 global User_name


 do shell script "pmset repeat wakeorpoweron MTWRFSU  " & Wake_time & ":00 shutdown MTWRFSU  " & Shutdown_time & ":00" user name User_name password pass_word with administrator privileges

 

return input


end run


__________________________


This avoids “sudo” command by appending “with administrator privileges”.


For this to work you have to enter your admin account name for “user_name” and its password for “pass_word” in the Applescript before compiling/running it.


With these amendments you can then change the workflow to an application.


When run it asks for the startup time in the form HH:MM then shutdown in same HH:MM.


Having set the times it runs terminal so you can confirm it has worked.




Repeating schedule 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.