正如我最近看到的那样
*/1 * * * * ./script.py
Run Code Online (Sandbox Code Playgroud)
我想知道它是否意味着相同
* * * * * ./script.py
Run Code Online (Sandbox Code Playgroud)
是的,它确实.
*/X意思是:每X分钟就
*意味着:每分钟
所以一起*/1意味着完全一样*.
来自man cron:
步长值可与范围结合使用. 在带有/ number的范围之后指定在该范围内跳过数字值的跳过.例如,
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'').星号后也允许步骤,所以如果你想说
every two hours'', just use*/2''.