CRON中的`* / 1 * * * *`和`* * * * *`等价? [英] Is `*/1 * * * *` and `* * * * *` equivalent in CRON?

查看:207
本文介绍了CRON中的`* / 1 * * * *`和`* * * * *`等价?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如我最近看到的

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

我想知道是否与

* * * * * ./script.py


推荐答案

是的。

* / X
* 表示每分钟

/ code>表示与 * 完全相同。

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

man cron


步骤值可以与范围一起使用。 跟随
范围,其中/ number指定跳过该数字的值,通过
范围
。例如, 0-23 / 2''可以在小时
字段中使用,以便每隔一小时指定命令执行(V7标准中的备选
0,2,4,6,8,10,12,14,16,18,20,22'')。

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'').

星号,所以如果你想每两小时说
,只需使用 * / 2''。

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

这篇关于CRON中的`* / 1 * * * *`和`* * * * *`等价?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆