crontab在某些小时之间每15分钟运行一次 [英] crontab run every 15 minutes between certain hours

查看:3463
本文介绍了crontab在某些小时之间每15分钟运行一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

推荐答案

您的命令很好!

要从7.00到19.45运行,每15分钟只需使用*/15,如下所示:

To run from 7.00 until 19.45, every 15 minutes just use */15 as follows:

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

也就是说,分钟"列中的内容*/15每15分钟执行一次操作,而第二列(持续数小时)将在指定的小时范围内执行该操作.

That is, the content */15 in the minutes column will do something every 15 minutes, while the second column, for hours, will do that thing on the specified range of hours.

如果要使其运行到19.00,则必须写两行:

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

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

您可以在crontab.guru中对该命令进行完整描述: https: //crontab.guru/#/15_7-19 _ _ _

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

这篇关于crontab在某些小时之间每15分钟运行一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆