나는 매킨토시 프로에서 매일 18시에 명령을 시작하도록 launchd를 구성했지만 작동하지 않았습니다.launchd가 스크립트를 시작했는지 확인하는 방법은 무엇입니까?
launchd가 명령을 실행했는지 확인하고 싶습니다. 나는 시스템 콘솔을 시험해 보았다. 아무 가치가없는 것을 발견했다.
내 맥 OS 버전은 맥 OS 인 X 10.8.3
내 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>mytask</string>
<key>Program</key>
<string>/opt/local/bin/node</string>
<key>ProgramArguments</key>
<array>
<string>/Users/xxx/My/task.js</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>18</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/xxx/launchd.stdout.log</string>
<key>StandardErrorPath</key>
<string>/Users/xxx/launchd.stderr.log</string>
</dict>
</plist>
나는 (나 같은) 그 did not주의를 지적 하겠지만 실행 파일은'/ opt/local/bin/node'의 정규화 된 것입니다. 스크립트가 [사용자 계정에서 실행 중이더라도] launchd는 사용자가하는 것보다 [다른 환경 구성] (https://discussions.apple.com/thread/3244126?tstart=0)이 있기 때문에 필요할 수 있습니다 (https : //developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html#page 제목). – Jeff