Feature request: Store finish timestamp of successful completion of JSM #138

Closed
opened 2026-01-19 18:31:39 +00:00 by michael · 3 comments
Owner

Originally created by @jrmfong on GitHub.

It would be very useful in creating smart groups based on the enrollment time through JSM if there is a flag file with completion time.

This will give us more granular control where policies can be run after x days of build.

It is suggested that completion time can be added to the flag file - /private/var/db/.JamfSetupEnrollmentDone

Originally created by @jrmfong on GitHub. It would be very useful in creating smart groups based on the enrollment time through JSM if there is a flag file with completion time. This will give us more granular control where policies can be run after x days of build. It is suggested that completion time can be added to the flag file - /private/var/db/.JamfSetupEnrollmentDone
michael added the enhancement label 2026-01-19 18:31:39 +00:00
Author
Owner

@entusdictus commented on GitHub:

You already can. The flag file has a timestamp on it which can be utilized by an extension attribute. You may use this code snippet as a base for your extension attribute:

stat -x -t "%Y-%m-%d" "/private/var/db/.JamfSetupEnrollmentDone" | grep "Birth" | awk '{print $2}'

Of course you can adjust the timestamp and the awk to also include %H:%M:%S, if needed.

@entusdictus commented on GitHub: You already can. The flag file has a timestamp on it which can be utilized by an extension attribute. You may use this code snippet as a base for your extension attribute: `stat -x -t "%Y-%m-%d" "/private/var/db/.JamfSetupEnrollmentDone" | grep "Birth" | awk '{print $2}'` Of course you can adjust the timestamp and the awk to also include %H:%M:%S, if needed.
Author
Owner

@scriptingosx commented on GitHub:

This has been implemented with v1.1beta. Please test and let us know if this works for you.

@scriptingosx commented on GitHub: This has been implemented with [v1.1beta](https://github.com/Jamf-Concepts/Setup-Manager/releases/tag/v1.1beta). Please test and let us know if this works for you.
Author
Owner

@scriptingosx commented on GitHub:

shorter stat command:

stat -f %SB -t %FT%T /private/var/db/.JamfSetupEnrollmentDone
@scriptingosx commented on GitHub: shorter stat command: ``` stat -f %SB -t %FT%T /private/var/db/.JamfSetupEnrollmentDone ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jamf/Setup-Manager#138