Automatically ejects an external disk after a Time Machine backup completes — no polling, zero CPU idle.
A launchd user agent watches /Library/Preferences/com.apple.TimeMachine.plist for changes (which macOS writes at the end of every backup). When it fires, the script checks tmutil status to confirm the backup is truly finished, then ejects the disk via diskutil eject. A macOS notification is sent on success or failure.
./install.shYou'll be prompted to enter the exact name of the volume to eject (as it appears under /Volumes). The script is installed to ~/Library/Scripts/ and the launchd agent to ~/Library/LaunchAgents/.
Verify it's running:
launchctl list | grep eject-tm./uninstall.shtail -f ~/Library/Logs/eject-tm.logtmutil startbackup
tail -f ~/Library/Logs/eject-tm.logThe disk will eject automatically when the backup finishes and a notification will appear.
- macOS (tested on macOS Sequoia)
- Time Machine configured with an external disk