在一天中设置3个特定时间的cron作业?

时间:2015-01-27 10:06:54

标签: cron

我知道如何在3小时内每小时或每小时进行一次,但如何为3个不同的特定时间设置cron作业?即:07:15,16:30,23:00。

1 个答案:

答案 0 :(得分:2)

通过添加这样的三行。

7点15分

15 7 * * * <command>

16:30

30 16 * * * <command>

23:00

0 23 * * * <command>

这是定义:

,----------------- minute (0-59)
| ,--------------- hour (0-23)
| | ,------------- day of month (1-31)
| | | ,----------- month (1-12) or use names
| | | | ,--------- day of week (0-7) (0 or 7 is Sun, or use names)
| | | | |
* * * * * <command>
相关问题