0,15,30,45 * * * * /path/to/command

Run a cron command every 15 minutes
Cron is a time based scheduling service on Linux and Unix computers which allows you to run process at specific times for example once a day, once every hour and so on. This brief post looks at how to run a cron command every 15 minutes.
The crontab format is minute – hour – day of month – month – day of week followed by the command to run. In the examples below the command to run is listed as /path/to/command – substitute this with the actual command you want to run. Any of these minute/hour/etc values can be * which matches any value.

There are two ways to run a cron command every 15 minutes. The first is like this, where each minute is specified:

0,15,30,45 * * * * /path/to/command
The above command will run every hour of every day on the hour, and at 15, 30 and 45 minutes past the hour. If you wanted to offset your 15 minute command to run on e.g. the 5th, 20th, 35th and 50th minutes of the hour you could do this instead:
5,20,35,50 * * * * /path/to/command
If you are happy with the command running at 0, 15, 30 and 45 then you can simplify the syntax with the second way of running a cron process every 15 minutes like so:

*/15 * * * * /path/to/command
This last example is the exact equivilent of the first example but more succinct.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值