Custom Trigger not working in v9.11

cgordy
Contributor

Surely I am doing something wrong, so I ask -

I have a smart group looking for a specific version of Chrome.
I want users to go to self service, run the policy that uninstalls that version, and then by a custom trigger, run the second policy to install the proper version based on my custom event trigger.

In a new policy, it is triggered by jamf policy -event chrome
In the policy that ought to run second, the Custom Event to use to initiate the policy is
chrome

The first policy runs from self service…removes the improper version of chrome, but the new version never shows up.
Logs for the uninstall policy tell me:
Running command jamf policy -event chrome...
Result of command: Checking for policies triggered by "chrome"... No policies were found for the "chrome" trigger.

So, is my syntax wrong on either of my policies or what?

8 REPLIES 8

stevewood
Honored Contributor II
Honored Contributor II

I would check to make sure the computers are meeting the scope requirements for the second policy. Typically when I have that type of problem it's either because the computers aren't in scope, or because they have already run the policy and the policy is set to "Once per computer".

Your syntax is correct, although you could move to calling the policy by ID # instead: jamf policy -id 123 You can get the ID # by going into the policy on the JSS and checking the URL for that policy. The ID # will be in the URL.

cgordy
Contributor

thanks Steve.
I changed the trigger to be by ID.
I double checked my two smart groups and the two policy scopes.
The machine does move from smart groups as inventory runs, but alas, I still get a failure.
Tells me no policies were found for the trigger.
I also changed that second policy from "once per computer" to ongoing as I try to make it work.

stevewood
Honored Contributor II
Honored Contributor II

How do you have the second policy set for recurrence? Is it set to "Ongoing" or "Once Per Computer"? If you're set to "Once per", double check the policy log to make sure the computer hasn't already run the policy.

What happens if after the failure you try running the policy manually? Still get the same error even though the computer is in scope?

cgordy
Contributor

it is set to Ongoing as I troubleshoot on this test machine.
I have not tried to run the second policy manually yet - I was hoping to stay clean and let the trigger run as designed..but I sure don't know why it won't work if my syntax is correct as well as my smart groups.

stevewood
Honored Contributor II
Honored Contributor II

As a test I would try running the policy manually just to see if it will install. If it is set to Ongoing, it will install again via the trigger.

Try running the policy manually and adding the -verbose option. That might help provide some insight into where the failure is.

jamf policy -id # -verbose

mm2270
Legendary Contributor III

You could also consider embedding a preinstall script inside a pkg install for the new version of Chrome that just rm -rfd's the path to the old Chrome version. We do something like that with our Firefox Self Service install. FF has a nasty habit of becoming broken if you install it on top of an older version so we simply rm the old app bundle, then drop the new one on disk in one installation.

Dirk
New Contributor

I am having the same issue, but this time with trying to do it with Skype.

The first policy runs fine, but it does not seem to run the trigger policy.

Finding it rather frustrating.

emily
Valued Contributor III
Valued Contributor III

This will happen if you didn't set a scope for the policy or the policy is set to once per computer/user and has already met that minimum. (Happened to me today.) Re-check your policy and make sure it's scoped to the machine you're trying to run it from.