Skip to main content
Question

Script deployment to Mac gets stuck on "Installed" and doesn't execute

  • February 18, 2025
  • 9 replies
  • 183 views

Forum|alt.badge.img+2

I have a script that I wish to use to remove old user accounts on Macs that have no activity after a specific date. I have ran this script manually on various Macs that we have with no issues, however when I try running it via Jamf, it gets stuck on "Installed" for the status and never executes. Even when I run a simple "echo "test"" script, this results in the same issue, so it seems that I am unable to run any scripts at all. If I go to "Result of script execution" it says "Could not load any current execution, we will try again soon...". This has been going on for maybe several months now, if anyone has any ideas on how to resolve this, it would be much appreciated. 

9 replies

Forum|alt.badge.img+11
  • Contributor
  • February 18, 2025

One of the things that is different in this context is the user which is running the script; when running locally the script would be running as the console user; when running from jamf, you would be running it as root; which could lead to different results depending on what exactly the script was doing.

Best to always get the current user and run any commands as them,  hope that helps


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • February 18, 2025

Two things come to mind:

  1. You should be reprovisioning computers between users unless this is some kind of lab situation. However even in a lab you should reprovision the computers every year or so, over summer sesmester for example.
  2. You cannot use a script to delete accounts with Secure Tokens, verify Secure Token status on the accounts. If they have Secure Tokens that is your problem.

Forum|alt.badge.img+2
  • Author
  • New Contributor
  • February 18, 2025

One of the things that is different in this context is the user which is running the script; when running locally the script would be running as the console user; when running from jamf, you would be running it as root; which could lead to different results depending on what exactly the script was doing.

Best to always get the current user and run any commands as them,  hope that helps


"echo "test"" should work as Root though, but this too gets stuck on "Installed". If even that fails, then it wouldn't be possible for me to try running the script as a different user, since I would need to use echo to get the current logged in user.


ITIsMagic
Forum|alt.badge.img
  • New Contributor
  • May 20, 2026

Did you ever get this working? We are currently running into the same issue. It worked for us a few months ago, but now when we run the script, it just says “installed” and never executes. Also, we get this when we check the status on the device in the script window on Jamf School: “Could not load any current execution, we will try again soon...”

 

It’s frustrating as we need to clear out student profiles as they keep clogging up the internal drives with files (long story short our past tech director screwed over our device storage).


Forum|alt.badge.img+10
  • Valued Contributor
  • May 20, 2026

One of the things that is different in this context is the user which is running the script; when running locally the script would be running as the console user; when running from jamf, you would be running it as root; which could lead to different results depending on what exactly the script was doing.

Best to always get the current user and run any commands as them,  hope that helps

"echo "test"" should work as Root though, but this too gets stuck on "Installed". If even that fails, then it wouldn't be possible for me to try running the script as a different user, since I would need to use echo to get the current logged in user.

Hey ​@pcd12345 

the following article from Armin Briegel might help you:

https://scriptingosx.com/2020/08/running-a-command-as-another-user/


Forum|alt.badge.img+10
  • Valued Contributor
  • May 20, 2026

Did you ever get this working? We are currently running into the same issue. It worked for us a few months ago, but now when we run the script, it just says “installed” and never executes. Also, we get this when we check the status on the device in the script window on Jamf School: “Could not load any current execution, we will try again soon...”

 

It’s frustrating as we need to clear out student profiles as they keep clogging up the internal drives with files (long story short our past tech director screwed over our device storage).

Hey ​@ITIsMagic 

why dont you just wipe the Macs and run a re-enrollement?


ITIsMagic
Forum|alt.badge.img
  • New Contributor
  • May 20, 2026

@JevermannNG That would require reinstalling all of the apps, which would take much longer. It’s an arts lab that has Final Cut Pro, Logic Pro, and the Adobe Suite on it, all of which doesn’t currently play nice with Jamf deployments.

After posting this, I managed to generate a new script using Gemini that did what we needed it to and worked, though. Took a couple of hours, haha.


  • New Contributor
  • May 20, 2026

The issue where scripts get stuck on "Installed" and fail to load execution results usually points to a breakdown in communication between the Jamf binary on the Mac and the Jamf Pro server. Since even a simple echo "test"!--tgqphd|[]--> fails, the problem is likely with the management framework or client-side binary rather than your specific account-deletion script. !--tgqphd|[]-->!--tgqphd|[]-->!--tgqphd|[]-->!--tgqphd|[]-->

!--tgqphd|[]-->


!--tgqphd|[]-->

If this has been happening for months across multiple devices, try these fixes in order:!--tgqphd|[]-->

  • Flush Policy History!--tgqphd|[]-->
    Sometimes Jamf "remembers" a failed state and won't re-run a script until the history is cleared.
    • Run sudo jamf flushpolicyhistory!--tgqphd|[]--> on a test machine.!--tgqphd|[]-->!--tgqphd|[]-->
    • Alternatively, go to the policy in Jamf Pro and use the Flush All!--tgqphd|[]--> button in the Logs tab.!--tgqphd|[]-->!--tgqphd|[]--> !--tgqphd|[]-->
    !--tgqphd|[]-->!--tgqphd|[]-->
  • Redeploy the Management Framework!--tgqphd|[]-->
    The local Jamf binary may be corrupted or stuck. !--tgqphd|[]-->!--tgqphd|[]-->
  • Check the Check-in Status!--tgqphd|[]-->
    If the device isn't communicating, it won't receive the "Run" command.
    • Open Terminal!--tgqphd|[]--> on the Mac and run sudo jamf check-in!--tgqphd|[]-->.!--tgqphd|[]-->!--tgqphd|[]-->
    • Watch for errors like Could not connect to the Jamf Pro Serve
    !--tgqphd|[]-->

agungsujiwo
Forum|alt.badge.img+10
  • Contributor
  • May 22, 2026

Hi ​@pcd12345  ,
Are you using Jamf School or Jamf Pro?