Skip to main content

Specifically, I would like a machine to restart (regardless of who is connected) every Friday at 6:00 PM. Can anyone help me with this?

A LaunchDaemon using a CalendarStartInterval for every Friday at 6 PM that just calls a /sbin/shutdown -r now command would do it.


Pardon my ignorance but, I'm not familiar on how to do that.


I do something similar to this to restart some electronic signs each night.



The script below will set the computer to restart every Friday at 6:00pm



#!/bin/bash
pmset repeat restart F 18:00:00


pmset -g sched will show you any presently set power schedules



pmset repeat cancel will cancel the repeating restart/shutdown/wake, etc.


Yep, forgot about pmset. Good thought @Berrier! Probably easier than with a LaunchDaemon.


I take that back, I've set it up and will check out the results. Thanks!


I haven't had occasion to use it since 10.6, but



pmset repeat restart


did not force a restart, so a logged in user with modified documents would result in the Mac not restarting. You're better off with the



shutdown -r now


approach if that will be a problem.


Is there anyway to disable the "Cancel" button that pops up for the user? I have no issue with them seeing a countdown and being able to click the "Restart" button, but I would prefer they don't cancel it.



Also, is there a way to set a time at which the pop-up shows up? If I want it to show up 1hr before the restart or 4hrs before a restart, is that possible?


I've done this via Sys Pre, Energy Saver, Schedule. Made the changes on a VM while using the vm/computer to make a settings pkg with composer. Then pushed the pkg out to the computers that needed the settings updated. You'll have a few ways to do this.