Skip to main content
Question

Running a script via jamf recon and automated runs have different results

  • August 29, 2025
  • 1 reply
  • 60 views

dhyeya

Seems like the root path of when the script is run automatically is different.

I have changed the path resolution to this now - 
currentUser=$(stat -f%Su /dev/console) userHome=$(dscl . -read /Users/$currentUser NFSHomeDirectory | awk '{print $2}') 

Will this solve my issue since i am looking up for some specific files in each computer?

I am trying to confirm if it works on automated runs since it does on the manual ones (jamf recon) - but how do i trigger the policy for all computers using the jamf dashboard?

1 reply

sharriston
Forum|alt.badge.img+10
  • Valued Contributor
  • August 29, 2025

The command `sudo jamf policy` (not recon) is a trigger caused by the Jamf agent performing a check in of the device. You can set what interval you want this to. As for policies Recurring Check in is one of the options and all that means is the policy will run during a check in. Do you know what your check in interval is set to?