开发者

Run a job every x minutes with startCalendarInterval in launchd (like using step values "*/x" in cron)?

I'm using mac osx 10.6 - and it seems that the minutes parameter determines how many minutes past the hour that the job runs. But how do you set up a job to run ever x minutes pa开发者_JAVA百科st the hour.

I've tried setting up minutes as an array of several numbers and an array with one string which is "*/5" i.e. similar to every five minutes syntax for crontab.


ok well here's a solution:

    <key>StartCalendarInterval</key>
<array>
    <dict>
        <key>Minute</key>
        <integer>0</integer>
    </dict>
    <dict>
        <key>Minute</key>
        <integer>55</integer>
    </dict>
</array>

So it seems you need to set up a dict for each repeated job.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜