Posted on 06-21-2019 07:24 AM
For somewhat elaborate reasons I want to create a policy that will run a jamf inventory update on computers when they first arrive at the office in the morning.
I tried doing a smart group like the attached image, however it goes off of a 24 hour period which means if inventory ran yesterday afternoon it would not run again until 24 hours.
I also tried to do a decimal (.5 or .3 days) but that did not work.
If I want to do an inventory the first time a computer checks in every day after say 8:00 AM what is the best way to do that?
Posted on 06-21-2019 07:34 AM
you could always do a launchdaemon thats set at a specific time (if your users are admins, you could run it as a launchagent)
for example, package this as org.jamf.recon.plist & deploy it to /Library/LaunchDaemons/org.jamf.recon.plist , how its set now it should run at 8:15 everday, and if it doesnt because they arent at work yet or computer is off, it will just check in when it can or at its normal time.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.jamf.recon</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>sudo jamf recon</string>
</array>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Weekday</key>
<integer>1</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>2</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>3</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>4</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>5</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
</array>
</dict>
</plist>
Posted on 06-21-2019 07:52 AM
Are these laptops that are coming into the office and you're wanting to get inventory as they arrive? What about an iBeacon above the front door? Then when the computer walks by, it triggers, and runs inventory. I used to do a sort of version of this where I'd put an iBeacon in my bag and then walk around the office before I left for the night and get all the computers to report inventory at the end of the night.
Posted on 06-21-2019 08:27 AM