Running a job every x minutes with startCalendarInterval in launchd (e.g. using * * x step values ​​in cron)?

I am using mac osx 10.6 - and it seems that the minutes parameter determines how many minutes have passed in an hour of the job. But how do you set up work to run in x minutes in an hour.

I tried to configure the minutes as an array of several numbers and an array with one line, which is "* / 5", that is, similar to every five minutes of the syntax for crontab.

+3
source share
1 answer

ok ok here is the solution:

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

So you need to set up a dict for each repetition.

+7
source

Source: https://habr.com/ru/post/1728768/


All Articles