Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kinglok opened this issue Jul 5, 2024 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@kinglok
Copy link

kinglok commented Jul 5, 2024

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 kinglok changed the title Feature request: Store finish timestamp of successful complete of JSM Feature request: Store finish timestamp of successful completion of JSM Jul 5, 2024
@entusdictus
Copy link

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.

@scriptingosx
Copy link
Collaborator

shorter stat command:

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

@scriptingosx scriptingosx added the enhancement New feature or request label Jul 9, 2024
@scriptingosx
Copy link
Collaborator

scriptingosx commented Sep 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants