如何设置cron触发时间规则每5分钟+2分钟延迟?

luk*_*uky 1 cron azure syntax

在 Microsoft Azure 中,每 5 分钟运行一次脚本:“0 */5 * * * *”

我以为我会每 5 分钟加 2 分钟运行另一个脚本,规则为:“0 */7 * * * *”,但后来我意识到我犯了一个错误(0,5,10,15 vs 0,7,14,21 )这不是我想要的 0,7,12,17 。

我该怎么做?PS:不想从 0 开始,所以我想我必须在分钟字段中添加 1/X 而不是 0/X。

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer

Ced*_*ght 6

你没有说哪个版本cron,但在 Vixie cron (在 BSD 和 GNU/Linux 中使用)上,你可以指定以下任一版本:

2-57/5 * * * * (command)
Run Code Online (Sandbox Code Playgroud)

或拼写出来

2,7,12,17,22,27,32,37,42,47,52,57 * * * * (command)
Run Code Online (Sandbox Code Playgroud)