Hi Guys
I have a script installed on some macs which submits informations about which user is logged in and the current state of the mac. I want this script to be run every 6 hours or whenever someone is logging in.
The file lies in "/Library/LaunchAgents/com.bolzenheim.script"
Well, the script runs fine every 6 hours, so this part works flawlessly.
However i expect it to be run whenerver someone loggs in but this does not appear to happen.
Oh by the way: I added a "sleep 15" to the executed script, so launchd doesn't think it's broken.
Could you please tell me what I do wrong?
I have a script installed on some macs which submits informations about which user is logged in and the current state of the mac. I want this script to be run every 6 hours or whenever someone is logging in.
The file lies in "/Library/LaunchAgents/com.bolzenheim.script"
Code:
<?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>com.bolzenheim.script</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>/Users/Shared/Utilities/script.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>21600</integer>
</dict>
</plist>
Well, the script runs fine every 6 hours, so this part works flawlessly.
However i expect it to be run whenerver someone loggs in but this does not appear to happen.
Oh by the way: I added a "sleep 15" to the executed script, so launchd doesn't think it's broken.
Could you please tell me what I do wrong?