在 cron 中,您可以指定 */n,其中 n 表示每 n 次周期,例如在第一列中是分钟。
*/5 means every 5 minutes, but which minutes? 0, 5, 10, ...?
Run Code Online (Sandbox Code Playgroud)
如果指定的数字不是 60 的除数会怎样?
*/7 what will happen, will it start to skew in the next hour?
Run Code Online (Sandbox Code Playgroud)
在 crontab 中,*是first-last(wherefirst是最小可能值,last是最大可能值)的简写。
语法first-last/step手段“每一个N地方N >= first,并N <= last和(N - first) % step == 0”。
所以*/7以分钟表示与0,7,14,21,28,35,42,49,56. 但1-59/7意味着1,8,15,22,29,36,43,50,57。