大网数据广告活动
服务器运维问答

How to set up cron trigger time rule every 5 mins + 2mins delay?

· 52CE 我爱测

In Microsoft Azure, this runs the script every 5 mins: "0 */5 * * * *" I thought i will run another script every 5 mins plus 2 mins with rule: "0 */7 * * * *" but then i realized i made a mistake (0,5,10,15 vs 0,7,14,21) that's n…

问题原文

原帖链接 · luky · CC BY-SA 3.0

In Microsoft Azure, this runs the script every 5 mins: "0 */5 * * * *"

I thought i will run another script every 5 mins plus 2 mins with rule: "0 */7 * * * *" but then i realized i made a mistake (0,5,10,15 vs 0,7,14,21) that's not 0,7,12,17 what i wanted.

How should i do that? PS: dont want to start at 0, so i guess i will have to add 1/X not 0/X in minutes field.

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

已采纳解答

原帖链接 · Cedric Knight · CC BY-SA 3.0

You don't say which version of cron, but on Vixie cron (used in BSD and GNU/Linux) you can specify either of:

2-57/5 * * * * (command)

or spell it out

2,7,12,17,22,27,32,37,42,47,52,57 * * * * (command)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。