trying create task starts on every day @ 4am restart mac , execute maintenance scripts. 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>local.job</string> <key>programarguments</key> <array> <string>/usr/bin/osascript</string> <string>/users/media/scripts/restartmac.scpt</string> </array> <key>runatload</key> <false/> <key>standarderrorpath</key> <string>/users/media/scripts/output/restartmac.txt</string> <key>standardoutpath</key> <string>/users/media/scripts/output/restartmac.txt</string> <key>startcalendarinterval</key> <array> <dict> <key>hour</key> <integer>04</integer> <key>minute</key> <integer>00</integer> </dict> </array> </dict> </plist>
if run launchctl unload / load reload plist file execute script. bit confused cause have set runatload parameter false. tried lot of things unable running. has idea fault here?
operation system: os x 10.9
the default of runatload key false. things can try :
- remove runatload key
- try label string
- new plist label , programarguments
- <array> not necessary when using 1 calendarinterval
- <integer>4</integer>
- <integer>0</integer>
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment