Skip to content

Operation

BigMac Admin edited this page Nov 13, 2022 · 5 revisions

How it Works

Renew is meant to be run on regular intervals throughout the day. It was designed to be used with a LaunchAgent which runs every 30 minutes, and an example LaunchAgent is provided.

When Renew is run, it checks the current uptime of the macOS device against the configuration profile to determine if the uptime is out of compliance.

Renew is designed to be MDM agnostic, and doesn't actually require an MDM server at all if you choose to manually install a configuration profile.

Renew runs independently, via Launch Agent, regardless of whether the device is online or checking into MDM/RMM to receive commands.

Thresholds and Behavior

If the device has been restarted within the configured acceptable timeframe, the script exits quietly.

If the device has an uptime which exceeds the configured uptime threshold, then they will be notified via the macOS Notification Center that they need to restart their computer as soon as they are able. If the device is within a Deferral timeframe, the user will not be notified again until that deferral timeframe has passed.

If the user ignores the notifications beyond the configured notification threshold, then a more prominent SwiftDialog window will appear informing the user that they have X deferrals remaining before they will be required to restart.

If the user ignores the deferral Swift Dialog windows beyond the threshold, Renew enters "Aggressive" mode and the user has no more deferral options and will be presented only with a button consenting to a restart.

Display Sleep Assertions

If a running application has a "Display Sleep Assertion", then the script exits quietly even if the device is past its uptime. A deferral is not processed in this case. A display sleep assertion means that an application has told the display not to sleep, even if the user appears idle. Zoom meetings, Teams calls, WebEx, PowerPoint presentations will all make display sleep assertions. If Zoom or Powerpoint is open, but the user is not in a meeting/call or presenting, then no assertion will be present.

By default, Display sleep assertions from the following apps/processes are ignored: obs (Open Broadcast Studio), Amphetamine (a common app used to keep your system awake), caffeinate (a command line utility used in scripts to keep your system awake while things are processing.)

User Consent is Always Required Prior to a Restart

Renew will never initiate a restart of a workstation without the user clicking the button to consent to it. Actions are taken dependent upon Swift Dialog exit codes, and exit code 3 is used to initiate a reboot (aka the Information Button). All other exit codes either immediately exit Renew.

When a user chooses to restart, they are presented with the standard "Restart" countdown window the same as if they had chosen to Restart using the Apple menu.