Nighty Restarts with Message Prompt

dtmille2
Contributor III

Hello,

I am looking at using Computers>Configuration Profiles>Energy Saver>Schedule to schedule a nightly restart for Macs in a Mac lab.

I'd like to have a message pop up warning potential users on the Mac that this is going to happen and to save their work, that kind of thing.

Anyone have some recommendations for implementing such a message, or another way of scheduling a nightly restart with such a message? I suppose another method would be a policy with some scripts that restarts the Mac and displays a message.

Thank you

4 REPLIES 4

mm2270
Legendary Contributor III

You would probably want to look at creating a LaunchDaemon and companion script to deploy to those Macs. The LaunchDaemon could have a specific StartCalendar array that would specify exactly when it should fire each day. The script would send up the message (first checking that someone is actually logged in to show a message to) and then either initiate the restart itself, or just allow the restart to occur from the setting in the Configuration Profile if you'd rather have it done that way.
But a Config Profile by itself isn't going to be able to pop up a message as far as I know, so you'll have to use some other method, like outlined above as an example, to accomplish that part.

dtmille2
Contributor III

Okay, thanks! Next stop: script repository!

dtmille2
Contributor III

Going to test this script:

https://www.jamf.com/jamf-nation/third-party-products/files/477/timedforcedshutdown-sh-this-script-will-help-to-enforce-a-mandatory-reboot-or-shut-down

mags
New Contributor II

@dtmille2 Did you ever have any luck with this script? Am looking to do something similar!