Skip to main content
Question

Question regarding policy execution via script......

  • January 11, 2019
  • 1 reply
  • 1 view

Forum|alt.badge.img+8

Hey all, when a script is used to execute policies.... example....

/blahblah/jamf policy -id ####

/blahblah/jamf policy -id ####

/blahblah/jamf policy -id ####

Does each policy finish 100% before it executes the next?

Also, I see people mentioning the ampersand (&) when referring to executing policies in scripts... how is that utilized please?

Thank you in advance!

1 reply

Forum|alt.badge.img+10
  • Valued Contributor
  • 193 replies
  • January 11, 2019

My understanding is that each policy has to finish before the next policy can run. As far as the & in a shell script or just in terminal you can string commands together using a double &&. For example I use the following often in terminal.

sudo jamf recon && sudo jamf policy && sudo jamf manage

Basically means:

Run the first command if it completes successfully run second command and if it completes successfully run third command.

You could also use a ; if you wanted the second and third command to run regardless of how the previous command finished.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings