Terminal Mode coding

I want to have my iMac shut down completely every night at a specific time and want it to start up every morning at a specific time. The Apple notes aka articles, are vague and I'm NOT a programmer. I used Energy Saver in the previous MacOS, but now that's gone! Boo. TIA for the 411 details on exactly what to type into Terminal mode.

iMac 21.5″, macOS 10.15

Posted on Jul 18, 2023 4:41 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 18, 2023 5:54 PM

Indeed, in macOS Ventura, you have to go through the Terminal application to make these settings.


Open Terminal (in the Applications > Utilities folder) and enter this command, for example:

sudo pmset repeat shutdown MTWRFSU 22:00:00 wakeorpoweron MTWRFSU 7:00:00


You will be asked to enter your password (you will not see the characters you type).


This command is broken down as follows:


  • "shutdown MTWRFSU 22:00:00": Turn off the Mac every day (the list of days is the somewhat "initial" of the day in English, e.g. "M' for Monday) at 10:00 PM (24-hour format/military time). In this exemple, the Mac would shut down everyday (MTWRFSU) at 10:00 PM.
  • "wakeorpoweron MTWRFSU 7:00:00": Similarly, this part of the command restarts the Mac every day at 7 AM.
1 reply
Question marked as Top-ranking reply

Jul 18, 2023 5:54 PM in response to John Padfield

Indeed, in macOS Ventura, you have to go through the Terminal application to make these settings.


Open Terminal (in the Applications > Utilities folder) and enter this command, for example:

sudo pmset repeat shutdown MTWRFSU 22:00:00 wakeorpoweron MTWRFSU 7:00:00


You will be asked to enter your password (you will not see the characters you type).


This command is broken down as follows:


  • "shutdown MTWRFSU 22:00:00": Turn off the Mac every day (the list of days is the somewhat "initial" of the day in English, e.g. "M' for Monday) at 10:00 PM (24-hour format/military time). In this exemple, the Mac would shut down everyday (MTWRFSU) at 10:00 PM.
  • "wakeorpoweron MTWRFSU 7:00:00": Similarly, this part of the command restarts the Mac every day at 7 AM.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal Mode coding

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