Sleep Timer

How to stop music on your Mac after a set time

Updated

The most reliable way to stop music on a Mac after a set time is to put the Mac itself to sleep. Sleep silences every app at once. You have three options: schedule sleep with pmset in Terminal, set a phone timer and close the lid, or use a menu bar timer that fades the volume first.

Pause buttons and in-app timers only cover one player. Sleep covers all of them — Spotify, the Music app, a YouTube tab in Safari, VLC, an audiobook in Chrome. The three methods below all end in the same sleeping, silent Mac; they differ in how the music ends, how flexible the timing is, and how much effort each night costs you.

The built-in way: pmset

macOS still ships with a command-line scheduler for power events. Open Terminal and set a nightly sleep time:

sudo pmset repeat sleep MTWRFSU 01:30:00

The letters are days of the week — M is Monday, U is Sunday — and the time is 24-hour. MTWRFSU means every night; a subset like MTWRF limits the schedule to weeknights. At 1:30 a.m. the Mac goes to sleep, and whatever is playing goes silent with it.

To see what is scheduled, run pmset -g sched. To remove the schedule, run sudo pmset repeat cancel. There is also sudo pmset sleepnow, which sleeps the Mac immediately — less a timer than an off switch, but occasionally handy.

This works, and it costs nothing. The honest downsides:

If your bedtime never moves and a hard cutoff does not bother you, this is a perfectly good answer.

The manual way

Set a timer on your phone for 45 minutes, and when it rings, reach over and close the MacBook’s lid. A closed lid means sleep, and sleep means silence. It is the least sophisticated method here, and the one most people actually use.

The catch is built into the premise: it only works if you are still awake when the phone rings. If the music does its job and you drift off first, it plays until morning. The stop is just as abrupt as with pmset — the song ends the instant the lid touches the deck. As a one-off, though, it is unbeatable: no setup, no commands, no software.

The comfortable way: a menu bar sleep timer

Sleep Timer for Mac does the same fundamental thing — puts the Mac to sleep at a chosen moment — but from the menu bar, and with a gentler landing. You pick a preset between 3 and 180 minutes, or an exact time like 1:15 a.m. In the final minutes, Sleep Fade steps the system volume down gradually, so nothing cuts off at full loudness. Because the fade happens at the system level, it covers every audio source — Spotify, Apple Music, Safari, Chrome, VLC — with no per-app setup. When the timer ends, the Mac sleeps; when it wakes, your original volume comes back.

For Apple Music specifically, the app can also pause playback properly before sleep. Spotify and browsers cannot be paused the same way, so there the silence comes from the fade plus sleep — which in practice sounds smoother than a pause anyway. If Spotify is your main player, the Spotify sleep timer guide walks through that exact setup.

A few details worth knowing. The app brings back the daily bedtime schedule Apple dropped from System Settings: set it once, and the Mac winds down at the same time every night, no Terminal involved. Shortly before sleep it shows a warning with a “+15 min” button, so if you are still awake you can push the deadline back without rebuilding the timer. An optional setting dims the screen during the countdown — and if what you actually want is the opposite, a dark screen while the music keeps playing, that is a different setup covered in how to dim the screen and keep music playing. There is also a widget, a Control Center control on macOS 26 and later, and Siri and Shortcuts support if you would rather just say the timer out loud.

Sleep Timer is $2.99 one time on the Mac App Store, requires macOS 14 or later, and uses no network access at all.

How the three ways compare

Method How the music ends Flexibility Cost
pmset schedule Hard cut, mid-track One fixed time; Terminal-only edits Free
Phone timer + closing the lid Hard cut — and only if you are still awake Any time, done by hand each night Free
Sleep Timer for Mac Volume fades out over the last minutes Presets, exact time, or a nightly schedule $2.99 once

All three end in the same place: a sleeping, silent Mac. If you are comfortable in Terminal and your bedtime never changes, pmset is free and dependable. If tonight is a one-off, the lid works fine. And if falling asleep to music is a nightly habit, a timer that fades first is the version of this you stop thinking about. Sleep Timer isn’t the only app built for that job, either — our best Mac sleep timer apps roundup lines it up against the alternatives.

Quick answers

Will putting my Mac to sleep stop music playing in Safari or Chrome?

Yes. Sleep suspends all audio on the Mac regardless of the source — browser tabs, Spotify, the Music app, VLC. That is why a sleep timer is the one method that works for every player at once.

Can I stop music after a set time without using Terminal?

Yes. A menu bar utility like Sleep Timer for Mac does the same job without commands: pick a preset or an exact time, and the Mac fades the volume and goes to sleep. Apple removed the graphical sleep schedule from System Settings in macOS Ventura, so Terminal and third-party apps are the two remaining routes.

Will my volume be back to normal in the morning?

With Sleep Timer, yes. Sleep Fade lowers the system volume gradually before sleep and restores your original level after the Mac wakes, so you are not greeted by a muted — or blasting — Mac the next day.

Does pmset still work on current versions of macOS?

Yes. The pmset command still works on current macOS; only the graphical schedule settings were removed. A schedule you set survives reboots, and `sudo pmset repeat cancel` removes it.

Try it tonight

Sleep Timer lives in your menu bar: countdown, exact time, or a nightly schedule. Music fades out gently, the screen dims, and your Mac goes to sleep without a jarring cutoff.

Get Sleep Timer for Mac

$2.99 · one-time purchase · no subscription