Crontab 每 15 分钟运行一次,凌晨 3 点除外? [英] Crontab run every 15 minutes except at 3AM?
本文介绍了Crontab 每 15 分钟运行一次,凌晨 3 点除外?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
除了凌晨 3 点之外,是否可以每 15 分钟(每小时等)运行一次 cronjob?
Is it possible to have a cronjob run every 15 minutes (over every hour etc..) except for at 3AM?
我想在凌晨 3 点运行另一个特殊的 cronjob,但我不希望另一个同时运行...
I have another special cronjob I want to run at 3AM, but I don't want the other one to run at the same time...
推荐答案
只有一个 cron 行,没有.三个,是的:
With one cron line, no. With three, yes:
# Every 15 minutes except for 3:00-3:59
*/15 0-2,4-23 * * * thejob
# 3:15, 3:30, 3:45
15-45/15 3 * * * thejob
# 3:00 dead
0 3 * * * otherjob
这篇关于Crontab 每 15 分钟运行一次,凌晨 3 点除外?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文