Posted on 04-19-2022 12:49 PM
Using Jamf Cloud hosted JSS 10.37.2 we're seeing an odd problem with policies run from Self Service that contain only a Script payload where they don't actually run the script. There's no error reported, and the Policy log shows it as Completed, but looking at the Details window shows there's no output from the script:
1 [STEP 1 of 3]
2 Executing Policy Something Something Something...
3 [STEP 2 of 3]
4 [STEP 3 of 3]
as opposed to a normal run which would look something like:
1 [STEP 1 of 4]
2 Executing Policy Something Something Policy Someting
3 [STEP 2 of 4]
4 Running script Something Something Script Something...
5 Script exit code: 0
6 Script result: Retrieving inventory preferences from https://something.jamfcloud/...
...
...
Submitting data to https://something.jamfcloud/...
<computer_id>1234</computer_id>
7 [STEP 3 of 4]
8 [STEP 4 of 4]
The problem appears to be attached to the policy as when the problem appears the policy won't run on any computer. Editing the policy in the JSS console then saving with no changes will allow the policy to run the script.
We do have a case open with Jamf Support for this, but it doesn't appear they have any other similar reports, so posting here in case anyone else has encountered this behavior.
04-20-2022 12:06 PM - edited 04-20-2022 12:11 PM
I am noticing that in our environment as well. I will test your workaround and edit with results. I will submit a Jamf ticket also.
Edit: Editing the policy in the JSS console then saving with no changes will allow the policy to run the script WORKS.
Posted on 04-20-2022 12:18 PM
@odj1041 Thank you for confirming the problem, and the workaround. The case I opened for this issue is CS0813927.
Posted on 04-20-2022 08:45 PM
Oh, lovely. We're planning our upgrade to 10.37.2 very soon, and I'm SO not looking forward to needing to deal with this. I have LOTS of policies that just run a script. *sigh* I hope Jamf fixes this one soon so we can move to whatever version addresses it in short order.
Posted on 06-30-2023 07:07 AM
Adding that this problem of disappearing payloads within Policies has come back more and more for us recently, continuing now on version 10.47.
When the problem occurs you can verify by viewing the all Polices screen in list view, and expanding the arrows on affected policies to see if the Scripts or Packages payloads are visible (they are still visible when viewing an individual policy). If they are not visible in the list view, you need to Edit > Save one of the affected policies with no changes as mentioned above, and all affecte policies work again and run all payloads. It confuses everybody of course, unless you've seen it before.
Posted on 09-22-2023 11:00 AM
(JSS 10.50 Jamf Cloud hosted) I've been experiencing this with policies that have scripts and an Mainteance -> Update Inventory Payload, whereas the Inventory update has not been happening. Editing and Saving with no changes did indeed resolve it for this one instance. Will need to test more to see if this is a permanent fix.
Cheryl
Posted on 09-22-2023 11:09 AM
Just as an FYI for anyone else that experiences the non-running scripts problem and discovers this thread... The current workaround recommend by Jamf is to set up a script that runs periodically and uses the Jamf Pro API to "touch" a Policy dedicated to the script (said policy not needing to do anything, it's just so the script isn't hitting a production policy).
Posted on 09-22-2023 11:10 AM
Thanks, as I just found that this is affecting more than one of my policies with scripts in them.
Cheryl
Posted on 09-22-2023 11:13 AM
When the problem occurs it will stop scripts from running in any policy, not just some. Editing and saving any policy (no actual changes required), even one that doesn't contain a script, will fix that.