Manual Trigger - documentation?

daworley
Contributor II

I feel like I'm missing something really simple. The Admin Guide nor a jaunt through the Nation here reveal information on creating a custom trigger.

Is there an article I'm missing that explains how this feature works?

2 ACCEPTED SOLUTIONS

mm2270
Legendary Contributor III

I'll admit there isn't much information out there about manual triggers, but it use is exactly as simple as rockpapergoat states it. Set a manual trigger for a policy, then from a script, which could be run from another policy or some other process, call it with 'jamf policy -trigger CustomTriggerName'

Easy. And it can be very useful under the right circumstances too.

View solution in original post

donmontalvo
Esteemed Contributor III

This one had me scratching my head a while back too...we use "install<appname>" for custom triggers:

Management > Computer Management > Policies > Create Policy > Create Policy Manually > Display and Exeution Setting > Triggered By: [color=blue][other...] [/color]Manual Trigger: [color=blue][installcyberduck][/color]

...we sometimes add a second trigger to kick in after the first:

Advanced > Run Command: [color=blue][jamf policy -trigger ftpbookmarks[/color]]

PS, If you rollover the (i) icon at the left of the policy, you'll see that the Run Command command runs last. :)

Don

--
https://donmontalvo.com

View solution in original post

5 REPLIES 5

rockpapergoat
Contributor III

you mean, like set the trigger to some value in the policy, then run the policy with a "jamf policy -trigger blah" command, right?

mm2270
Legendary Contributor III

I'll admit there isn't much information out there about manual triggers, but it use is exactly as simple as rockpapergoat states it. Set a manual trigger for a policy, then from a script, which could be run from another policy or some other process, call it with 'jamf policy -trigger CustomTriggerName'

Easy. And it can be very useful under the right circumstances too.

daworley
Contributor II

Okay, I think I was over thinking it.

Thanks for the reality check. ;)

donmontalvo
Esteemed Contributor III

This one had me scratching my head a while back too...we use "install<appname>" for custom triggers:

Management > Computer Management > Policies > Create Policy > Create Policy Manually > Display and Exeution Setting > Triggered By: [color=blue][other...] [/color]Manual Trigger: [color=blue][installcyberduck][/color]

...we sometimes add a second trigger to kick in after the first:

Advanced > Run Command: [color=blue][jamf policy -trigger ftpbookmarks[/color]]

PS, If you rollover the (i) icon at the left of the policy, you'll see that the Run Command command runs last. :)

Don

--
https://donmontalvo.com

tlarkin
Honored Contributor

I just want to reiterate what Don posted above. The Run command in a policy runs after the policy executes. So the CasperShare is no longer mounted, it runs at the very end. Just keep that in mind. If you daisy chain to another policy the process should start over, but you could run into some logic issues.

Just be sure to test it out a ton before deploying, but that goes with out saying.

Thanks,
Tom