Posted on 04-10-2012 08:30 AM
Hey all, anyone know of a way to force a policy to run again on select systems that have already run it, by using the "jamf policy -id <id" command, or some other way? For example, if you have a policy that is set to "Once every day", can you make it run again before the 24 hours is up via a script?
In my initial tests, using the above syntax, I just get the "No Policies were found for the ID <id>" error. I'm certain I'm using the correct policy id number, and the system is in the scope for the policy, so I'm guessing its because its set for once per 24 hours and won't execute again until its time.
I know about the "flushPolicyHistory" flag for the jamf binary, but there is no description about it in help, and I'm concerned it flushes ALL policy histories, which is not something I want to do. I'm just looking to target the one policy that I would like to force run again.
So, anyone know if there is some way to accomplish this?
Solved! Go to Solution.
Posted on 04-10-2012 08:50 AM
Scopes overrule even if used via command line, I usually Duplicate the Policy and set it to none and call it via sudo jamf policy -id ***
Posted on 04-10-2012 08:50 AM
Scopes overrule even if used via command line, I usually Duplicate the Policy and set it to none and call it via sudo jamf policy -id ***
Posted on 04-10-2012 09:07 AM
Yeah, that's what I figured too. I just thought I'd ask on the off chance there was some undocumented way around it, but there probably isn't. I think I have a way I can achieve what I'm looking to do without duping the policy though.
Thanks for the reply.
Posted on 04-10-2012 09:25 AM
Yeah scope trumps all. If it's not in scope, you can't force it to run.
Posted on 02-20-2013 08:43 AM
Where do you find the policy ID?
Posted on 02-20-2013 08:47 AM
@mqh777 - go to JSS, mgmt, find policy, edit policy, look at URL - will end with policy_id=xxx giving you the ID