Hello. I'm trying to get launchd to act like cron and execute a script on Friday afternoons to install software updates (education environment). My shell script works fine, but I can't get launchd to launch it at a specific time.
I am using:
sudo launchctl load com.sps.autoupdate.plist which runs my script immediately instead of at the time specified within the plist. Any ideas as to how to correctly format the plist? Here it is:
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sps.autoupdate</string>
<key>ProgramArguments</key>
<array>
<string>/Users/test/SPSupdate</string>
</array>
<key>OnDemand</key>
<false/>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>16</integer>
<key>Minute</key>
<integer>00</integer>
<key>Weekday</key>
<integer>5</integer>
</dict>
</dict>
</plist>
Thanks for your help---
I am using:
sudo launchctl load com.sps.autoupdate.plist which runs my script immediately instead of at the time specified within the plist. Any ideas as to how to correctly format the plist? Here it is:
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sps.autoupdate</string>
<key>ProgramArguments</key>
<array>
<string>/Users/test/SPSupdate</string>
</array>
<key>OnDemand</key>
<false/>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>16</integer>
<key>Minute</key>
<integer>00</integer>
<key>Weekday</key>
<integer>5</integer>
</dict>
</dict>
</plist>
Thanks for your help---