它看起来像加载但在使用launchctl list和使用launchctl start时状态为1......它说没有这样的过程......我把它保存在/Users/IMG/Library/LaunchAgents中。sh 脚本运行良好。日志没有显示任何内容 - 没有创建文件。我对 plist 很陌生,所以请原谅无知。
<?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.IMG.shed</string>
<key>ProgramArguments</key>
<array>
<string>/Users/IMG/2012/Dropbox/Dev_2012/Java/sh_IMG.sh</string>
</array>
<key>StandardOutPath</key>
<string>myjob.log</string>
<key>StandardErrorPath</key>
<string>myjob.log</string>
<key>Debug</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>