Race between policy script and macOS update - which happens first?

dacontracta
New Contributor

Hey Jamf Nation! I have a short script set to run once per computer at recurring check in. I am also about tell Jamf to update macOS from 14.7 to macOS 15. I believe individual Macs check for macOS updates as part of the recurring check in (very easily could be wrong!). My question is, which happens first? If a Mac contacts Jamf as part of a recurring check in, and finds out it is due for both a script to run and a macOS update, which does it do first?

Thank you all!

2 REPLIES 2

Shyamsundar
Contributor

Your policy which contains script execute , as macOS updates it need to download the updates and it depends on what option you selected to restart the device , whether you given deferral or scheduled based on that users can defer the restart , hence there are high chance your script will execute first , 

AJPinto
Honored Contributor III

It depends on how you write the script. 

 

Macs check for OS updates every 24hrs, and will check whenever they receive an OS update MDM/DDM Command.  If your script has softwareupdate -l in it, this will tell Macs to check for available updates with the script and it will happen at whatever order you place it within the script. 

 

Be aware, it is no longer recommended and in most cases not possible to install OS updates with a script. Baring any API stuff you are doin with Jamf.