小编hyw*_*l51的帖子

如何检查launchd是否已启动脚本?

我将launchd配置为每天晚上18点在我的mac pro上启动命令,但它无法正常工作.

我想检查一下launchd是否运行了该命令.我试过系统控制台,没有找到任何有价值的东西.

我的mac os版本是mac 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>
Run Code Online (Sandbox Code Playgroud)

launchd

23
推荐指数
1
解决办法
3万
查看次数

标签 统计

launchd ×1