OS X Mountain Lion 10.8.3 で簡単なタスクをスケジュールしようとしています。
launchctl start nextstopsun.helloworld
コマンドはスクリプトを実行せず、コンソールにメッセージをスローします
4/2/13 9:50:49.663 PM com.apple.launchd.peruser.501[139]: (nextstopsun.helloworld[46729]) Job failed to exec(3) for weird reason: 8
私の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>nextstopsun.helloworld</string>
<key>Program</key>
<string>/Users/nextstopsun/Work/scripts/hw.sh</string>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>21</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
<key>UserName</key>
<string>nextstopsun</string>
</dict>
</plist>
スクリプトも非常にシンプルです
echo "Hello World!" > hw.log
launchctl はエラーなしでロードしました。シェルからスクリプトを実行すると、期待どおりに動作します。ログオフして再度ログインしても役に立ちません。Googleで答えが見つかりませんでした。その「奇妙な理由: 8」とは何ですか?