Search code examples
c#azurecronwebjob

Azure WebJobs And correct syntax for crone schedule and job trigger


I have uploaded a settings.job file containing {"schedule":"0 0/10 0 ? * * *"} in to my job root folder

enter image description here

But that doesn't seems to trigger(app is set to always on). for what I understand this should run EVERY 10 minutes.

What is correct crone syntax? I have found at least 3 different examples.

0 0/10 0 ? * * *

0 */10 * * * *

*/10 * * * *


Solution

  • Azure WebJobs and Azure Functions are using the NCronTab library to parse CRON expressions. There is a guide on how to correctly define the NCronTab expression which can be found on MSDN. There's also a pretty good cheatsheet which I'm using, and it states:

    0 */5 * * * * every 5 minutes

    So just replace 5 to 10 and you should be good to go.