1

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

luky
  • 219

1 Answers1

6

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)
  • Hi Cedric thank you for reply i will optionally try it. Now after a nap, i am thinking what i need is in fact again 5 mins interval (not 7 as i thought) but shifted with 2 mins, so maybe could also work 0 7/5 * * * * - five 5 mins interval starting from 7th minute. But optionally i can also use your solution. It is an Azure cron. – luky Aug 20 '17 at 11:15
  • I should have guessed MS from the additional seconds field. The MS documentation links to Wikipedia though, so I'd assume 2-57/5 would work every five minutes as it does with vixie-cron. Your 7/5 would only trigger at 7 minutes past the hour AFAIK. – Cedric Knight Aug 20 '17 at 14:11