正如我最近看到的那样
*/1 * * * * ./script.py
我想知道它是否与
相同* * * * * ./script.py
答案 0 :(得分:5)
是的,确实如此。
*/X
表示:每隔X分钟
*
表示:每分钟
所以*/1
所有这些意味着与*
完全相同。
来自man cron
:
步长值可与范围结合使用。 跟着一个 范围与/数字指定跳过数字的值 范围。例如,
0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is
0,2,4,6,8,10,12,14,16,18,20,22'')。星号后也允许步骤,所以如果你想说
every two hours'', just use
* / 2 ''。