Forcing checkin

kyoung
Contributor

I am doing testing and I don't want to wait for the recurring checkin trigger to time out. Is there a command that forces a checkin right now?

1 ACCEPTED SOLUTION

kyoung
Contributor

Good stuff. Thanks loads for the foundational clarification.

View solution in original post

9 REPLIES 9

mm2270
Legendary Contributor III

Yes.

sudo jamf policy

Edit: You might also want to set up your test policy to use a manual trigger in addition to the check-in trigger. Just click the "Custom" box in the General pane of the policy and add a unique string there. In Terminal, you can run

sudo jamf policy -trigger "somestring"

to call the policy manually.
But either way works.

kyoung
Contributor

I wondered if that was the one. Thanks much.

OK. If I have a policy set to run weekly at checkin a "sudo jamf policy" will force an immediate run of the policy? If the policy does not run I have another problem. It's not an issue of frequency timing?

adamcodega
Valued Contributor

Running jamf policy will make a check in occur immediately instead of at its next scheduled time. However this does not force policies to run. The policies that run will still depend on their schedule. So your weekly policy will only run if it's due to run at that time.

If you want to run policies on demand you should set a manual trigger as well as a regularly scheduled time.

mm2270
Legendary Contributor III

Like what @adamcodega stated. Scope overalls everything else, so if the Mac is not in scope to run your policy based on the execution frequency (or any other condition), then no, simply running sudo jamf policy won't make it run. Same would be true if the execution frequency is set to Once per computer. Once it runs once, calling sudo jamf policy isn't going to make it run again until you flush the policy log.

I suggest setting up test policies to run with a manual trigger plus Execution Frequency set to Ongoing. That way you can run it as often as you need to manually fro Terminal. Of course, in some cases its not going to make sense to set the frequency to Ongoing. For ex, if its installing an OS update. For that, you would need to revert your test Mac to effectively test it again, or scope several test Macs to the policy.

kyoung
Contributor

Good stuff. Thanks loads for the foundational clarification.

cmarker
Contributor

I will say that I am a big fan of setting up Self Service policies for testing instead of forcing myself to launch an elevate a terminal session.

andrew_nicholas
Valued Contributor

I agree with @Marker.43. When I'm testing an app I usually just change the frequency to Ongoing and enable it in Self Service until I'm ready to finalize its recurrence schedule.

bentoms
Release Candidate Programs Tester

Just 3rding what @Marker.43 & @andrew.nicholas suggested. :)

walkeri3rd
New Contributor III

Does anyone know of a why to make the computer check into Jamf and notify the user that their device has not checkin?