如何在每周日运行 crontab 作业 [英] How to run crontab job every week on Sunday
本文介绍了如何在每周日运行 crontab 作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想弄清楚如何在每周日运行 crontab 作业.我认为以下应该有效,但我不确定我是否理解正确.以下正确吗?
I'm trying to figure out how to run a crontab job every week on Sunday. I think the following should work, but I'm not sure if I understand correctly. Is the following correct?
5 8 * * 6
推荐答案
这里是 crontab 格式的说明.
Here is an explanation of the crontab format.
# 1. Entry: Minute when the process will be started [0-60]
# 2. Entry: Hour when the process will be started [0-23]
# 3. Entry: Day of the month when the process will be started [1-28/29/30/31]
# 4. Entry: Month of the year when the process will be started [1-12]
# 5. Entry: Weekday when the process will be started [0-6] [0 is Sunday]
#
# all x min = */x
因此,根据此您的 5 8 * * 0
将在每周日 8:05 运行.
So according to this your 5 8 * * 0
would run 8:05 every Sunday.
这篇关于如何在每周日运行 crontab 作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文