Schedule automatic macOS restarts using Power Management settings with configurable times and days
This Automox Worklet™ configures scheduled restarts on macOS endpoints using the Power Management utility (pmset). The Worklet first checks whether an existing restart schedule is already configured using the command pmset -g sched.
If no schedule exists, the Worklet applies one using configurable parameters: the specific time (in 24-hour format), the days of the week for automatic restarts (Monday through Friday, weekends, or custom combinations), and optionally a specific date for a one-time restart.
At the scheduled restart time, users receive a macOS notification with a ten-minute countdown. Users can accept the restart immediately or cancel it before the countdown expires. If the restart is triggered by a software installation or security update requiring a reboot, the endpoint will restart at the next scheduled time.
Users who defer restarts indefinitely leave endpoints running with unpatched vulnerabilities and degraded performance. Security updates requiring reboots sit unapplied for weeks or months, exposing your organization to known exploits. System memory leaks accumulate, applications become unstable, and performance degrades. When IT manually requests restarts, users ignore the requests or restart at inconvenient times, causing work disruption and data loss.
This Automox Worklet establishes predictable maintenance windows through scheduled restarts. You communicate the restart schedule to users in advance, balancing security patch application with user convenience. The automation removes manual coordination overhead and prevents system drift where some endpoints restart while others remain vulnerable. Users receive a ten-minute notification before each scheduled restart, allowing them to save work or cancel if actively working, while the consistent schedule keeps endpoints current with security patches across your entire macOS infrastructure.
Evaluation phase: The Worklet queries the endpoint's Power Management configuration with pmset -g sched to detect any existing restart schedule. If a schedule is already active, the evaluation exits without making changes, preserving the current configuration.
Remediation phase: If no schedule exists, the Worklet applies the configured restart schedule using the command pmset repeat restart [DAYS] [TIME] with your specified days and time. The script then verifies the configuration was applied successfully by checking pmset -g sched again.
macOS system with Power Management support (all modern macOS versions)
Administrator or root privileges to execute pmset commands
Bash shell environment (standard on all macOS endpoints)
Time format in 24-hour notation (HH:mm:ss), such as 02:30:00 for 2:30 AM
Day format using MTWRFSU notation: M (Monday), T (Tuesday), W (Wednesday), R (Thursday), F (Friday), S (Saturday), U (Sunday)
Optional date parameter in MM/dd/yy HH:mm:ss format for scheduled one-time restarts
After completion, the endpoint has an active restart schedule configured in Power Management. At the scheduled time, the endpoint displays a restart notification with a ten-minute countdown timer. Users can accept the restart immediately, cancel it before the countdown expires, or let it proceed automatically when the timer reaches zero. The schedule repeats on the configured days each week until modified or canceled.
Verify the schedule by running pmset -g sched in Terminal, which displays the configured restart days and time in MTWRFSU format. Check System Preferences > Energy Saver > Schedule to see the restart configuration in the GUI. To modify the schedule, run pmset repeat cancel to disable the current schedule, then execute the Worklet again with new parameters to apply different days or times.
Run this Worklet on a pilot macOS endpoint and review evaluation output for create reboot schedule.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as exit, else.
Validate remediation effects from script operations such as function, pmset, exit, then rerun evaluation for compliance.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy