Tôi đang cố gắng sử dụng như sau .plist để gọi một kịch bản python.
<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.apple.inMemTask14</string>
<key>ProgramArguments</key>
<array>
<string>/Users/open/Library/Containers/.heheOSX/MacOSHighSierra.py</string>
</array>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>
Vì một số lý do khi tôi thực thi:
launchctl load -w /Users/open/Library/LaunchAgents/com.apple.inMemTask14.plist
Tôi nhận được các lỗi sau trong system.log của mình:
Mar 27 11:39:19 openZ-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.inMemTask14): This service is defined to be constantly running and is inherently inefficient.
Mar 27 11:39:19 openZ-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.inMemTask14[1335]): Could not find and/or execute program specified by service: 13: Permission denied: /Users/open/Library/Containers/.heheOSX/MacOSHighSierra.py
Mar 27 11:39:19 openZ-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.inMemTask14[1335]): Service setup event to handle failure and will not launch until it fires.
Tôi đã cho phép thực thi kịch bản python. Có gì không ổn với tôi .plist? Làm thế nào tôi có thể sửa các lỗi hiển thị trong nhật ký?