How would I get a cron job to run every 30 minutes?

前端 未结 6 1230
鱼传尺愫
鱼传尺愫 2020-12-04 07:36

I\'m looking to add a crontab entry to execute a script every 30 minutes, on the hour and 30 minutes past the hour or something close. I have the following, but

6条回答
  •  情话喂你
    2020-12-04 07:52

    Try this:

    0,30 * * * * your command goes here
    

    According to the official Mac OS X crontab(5) manpage, the / syntax is supported. Thus, to figure out why it wasn't working for you, you'll need to look at the logs for cron. In those logs, you should find a clear failure message.

    Note: Mac OS X appears to use Vixie Cron, the same as Linux and the BSDs.

提交回复
热议问题