crontab每隔15分钟运行一次。

时间:2021-02-25 01:09:18

Is this correct scheduled to run between 07:00 and 19:00 at every 15 minutes?

这个正确的时间安排是每15分钟在07:00到19:00之间吗?

*/15    07-19        *     * *     /path/script

3 个解决方案

#1


24  

Yes! Well, more or less

This will run from 7.00 until 19.45, every 15 minutes:

从7点到19点45分,每15分钟:

*/15    07-19        *     * *     /path/script

If you want it to run until 19.00 then you have to write two lines:

如果你想让它运行到19点,你必须写两行:

*/15    07-18        *     * *     /path/script
0          19        *     * *     /path/script

You can have a full description of the command in crontab.guru: https://crontab.guru/#/15_7-19___

您可以在crontab中对命令进行完整的描述。大师:https://crontab.guru/ / 15 _7-19___

#2


4  

Try this interactive site to create crontabs

尝试这个交互式站点来创建crontabs

https://crontab.guru/every-10-minutes

https://crontab.guru/every-10-minutes

#3


2  

Yes, that's correct.

是的,这是正确的。

The entry in crontab would should be:

crontab的条目应该是:

*/15 7-19 * * * /path/script >/dev/null 2>&1

#1


24  

Yes! Well, more or less

This will run from 7.00 until 19.45, every 15 minutes:

从7点到19点45分,每15分钟:

*/15    07-19        *     * *     /path/script

If you want it to run until 19.00 then you have to write two lines:

如果你想让它运行到19点,你必须写两行:

*/15    07-18        *     * *     /path/script
0          19        *     * *     /path/script

You can have a full description of the command in crontab.guru: https://crontab.guru/#/15_7-19___

您可以在crontab中对命令进行完整的描述。大师:https://crontab.guru/ / 15 _7-19___

#2


4  

Try this interactive site to create crontabs

尝试这个交互式站点来创建crontabs

https://crontab.guru/every-10-minutes

https://crontab.guru/every-10-minutes

#3


2  

Yes, that's correct.

是的,这是正确的。

The entry in crontab would should be:

crontab的条目应该是:

*/15 7-19 * * * /path/script >/dev/null 2>&1