Is `*/1 * * * *` and `* * * * *` equivalent in CRON?

拥有回忆 提交于 2019-12-23 12:37:44

问题


As I have recently seen something like

*/1 * * * * ./script.py

I would like to know if it means the same as

* * * * * ./script.py

回答1:


Yes, it does.

*/X means: every X minutes * means: every minute

So all together */1 means exactly the same as *.


From man cron:

Step values can be used in conjunction with ranges. Following a range with /number specifies skips of the number's value through the range. For example, 0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is0,2,4,6,8,10,12,14,16,18,20,22'').

Steps are also permitted after an asterisk, so if you want to say every two hours'', just use*/2''.



来源:https://stackoverflow.com/questions/22012561/is-1-and-equivalent-in-cron

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!