Skip to content

Instantly share code, notes, and snippets.

@talkingmoose
talkingmoose / JamfHelper countdown dialog.sh
Last active October 25, 2022 23:30
Example of a countdown dialog that can be added to a Jamf Pro policy using a Before script to alert users that something will happen and give them a visual cue that time is running out. Ideal for policies that need to upgrade software such as macOS after gentle reminders and notifications have failed to get their attention.
#!/bin/bash
# Displays a dialog to the end user with a five minute countdown. If the countdown reaches 0:00 or the user clicks the button, the dialog disappears allowing the remainder of the workflow to proceed.
/Library/Application\ Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper \
-windowType utility \
-lockHUD \
-title "macOS Mojave Upgrade" \
-heading "ALERT: Your upgrade is about to start!" \
-description "Your Mac will automatically upgrade its operating system in five minutes and can no longer be deferred. Close and save your work now.