How to schedule a Mac to sleep or shut down at a set time
· 6 min read
On macOS 13 Ventura and later there is no Schedule button in System Settings. The feature still exists, but you set it in Terminal with pmset: one line creates a repeating sleep or shutdown, one line shows it, and one line cancels it. The commands are below, along with what really happens at the scheduled time and whether forcing the Mac off is the right way to end a workday.
Where the Schedule setting went
Older versions of macOS had a Schedule button in the Energy Saver (or Battery) pane of System Preferences, with two checkboxes: start up or wake at one time, sleep or shut down at another. When System Preferences became System Settings in macOS 13, that panel did not come along.
The power management underneath did not change. The same schedule can still be set with pmset, the command-line tool macOS uses for power settings. It is built in, so there is nothing to install.
Schedule sleep or shutdown with pmset
- Open Terminal (in Applications, Utilities).
- To put the Mac to sleep every weekday at 6:30 in the evening, type:
sudo pmset repeat sleep MTWRF 18:30:00
- Enter your administrator password when asked. Nothing appears as you type; that is normal.
- Check that it took:
pmset -g sched
You should see the repeating event listed.
The pieces of that command:
- The type.
sleeporshutdownto stop;wake,poweronorwakeorpoweronto start. - The days. One letter per day: M, T, W, R, F, S, U. R is Thursday and U is Sunday.
MTWRFis weekdays;MTWRFSUis every day. - The time. Twenty-four hour clock, written as hours, minutes and seconds.
To shut down instead of sleeping:
sudo pmset repeat shutdown MTWRF 18:30:00
To remove the schedule:
sudo pmset repeat cancel
Setting a start and a stop together
pmset holds one pair of repeating events: one that starts the Mac and one that stops it. A new repeat command replaces the old one, so if you want both, put them on the same line:
sudo pmset repeat wakeorpoweron MTWRF 08:30:00 sleep MTWRF 18:30:00
That means you cannot have a 6:30 sleep on weekdays and a different time on Saturday as two repeating events. For a single occasion, pmset schedule takes a date:
sudo pmset schedule shutdown "10/09/26 22:00:00"
The date is month, day, two-digit year, and it has to be in quotes.
What really happens at the scheduled time
A scheduled event is less forceful than it sounds, and it helps to know the limits before relying on it.
- You get a warning first. macOS typically shows a notice with a countdown before a scheduled sleep or shutdown, and you can cancel from there.
- The Mac has to be awake. A scheduled shutdown only happens if the Mac is awake at that time. A laptop that is already asleep with the lid closed stays asleep.
- Unsaved work can stop it. If a document has unsaved changes, the app will ask what to do, and the shutdown may wait or be abandoned.
- Starting up needs power. A scheduled wake or startup on a laptop generally needs the power adapter connected.
Sleep is nearly always the better choice. It leaves your windows where they were, uses very little power, and tomorrow starts where today stopped. A shutdown closes everything, which is only what you want if the point is to make restarting feel like effort.
Should a scheduled shutdown be your closing time?
Many people who search for this are not managing power. They want the workday to end, and they are hoping the Mac will enforce it.
It can help, and it has a weakness. At 6:30 you are mid-sentence, the countdown appears, and you cancel it. Do that four evenings in a row and the countdown becomes one more notification you dismiss without reading. A hard stop that you can override in one click is only as strong as your mood at 6:30.
What tends to hold better is a signal that marks the end of the day without fighting you. Punchcard is a menu bar app that notices which app is in front as you work and, at the closing time you set, prints a paper receipt of the day: one line per app with the time on each, a day total and a stamp. It does not lock the Mac, close anything or block you from carrying on. It just makes the end of the day an event you can see, with a number on it.
The two work well together. Set the receipt for 6:00 and the sleep for 6:30. The receipt says the day is over; the half hour is for wrapping up; the sleep is the backstop. Keep them in that order, because if the Mac is asleep at your closing time, the receipt prints late, headed SORRY WE MISSED YOU. A “SORRY WE MISSED YOU” day explains what that means for the record.
Punchcard’s tracking is free and never expires, and the first two receipts are free. Printing after that needs the license, $9 once. For the habit itself, How to set a closing time for your workday (and keep it) goes further.
Other built-in ways to mark the end of the day
If a full sleep is too blunt, macOS has two gentler schedules.
Downtime. In System Settings, Screen Time, Downtime, turn on a schedule and pick the hours. During Downtime, apps that are not on your Always Allowed list show a time-limit screen when you open them. On your own Mac you can choose to ignore the limit, so this is a speed bump, not a wall.
A scheduled Focus. In System Settings, Focus, pick or create a Focus and add a time-based schedule. Allow only the people and apps you want to hear from in the evening. This does not stop you from working, but it stops work from calling you back.
Neither one touches power, and both can sit alongside a pmset schedule.
Questions
Does the schedule survive a restart?
Yes. A repeating event stays until you run sudo pmset repeat cancel. It is worth running pmset -g sched after a major macOS update to confirm it is still there.
Will a scheduled shutdown lose my unsaved work?
It should not. Apps with unsaved changes ask before quitting, and that prompt can hold up the shutdown. Do not treat that as a safety net, though; save before you walk away.
Can I schedule sleep without using Terminal?
Not as a clock time in System Settings on recent versions of macOS. You can set how long the display stays on when idle under Lock Screen, which is a different thing: it reacts to you being away, not to the time of day.
Does sleep affect a time record?
Time asleep is not time in front of an app, so it adds nothing to the day. Sleep, screensaver and lid close covers what each state does.