Setup-Manager icon indicating copy to clipboard operation
Setup-Manager copied to clipboard

Feature request: Store finish timestamp of successful completion of JSM

Open kinglok opened this issue 1 year ago • 2 comments

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

kinglok avatar Jul 05 '24 11:07 kinglok

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 avatar Jul 09 '24 11:07 entusdictus

shorter stat command:

stat -f %SB -t %FT%T /private/var/db/.JamfSetupEnrollmentDone

scriptingosx avatar Jul 09 '24 14:07 scriptingosx

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

scriptingosx avatar Sep 09 '24 14:09 scriptingosx