Search code examples
azurecronazure-webjobs

How can i schedule a job between 04:00 and 21:00 on every 5 minutes with Azure Web Job


I need to schedule a job on Azure. I need to schedule the job between 04:00 and 21:00 every 5 minutes.

I try the below cron expression but it didn't work.

0 */5 4-21 * * *

How can I do that?


Solution

  • I need to schedule a job on Azure. I need to schedule the job between 04:00 and 21:00 every 5 minutes.

    To do that one of the workaround could be able to solve the above issue,

    If you want to use the cron expression to run every 5 minutes between 04:00- 21:00 , you can use in your json as below:

    {"schedule": "0,05 4-21 * * *"}

    For more information please refer this Blog post & SO THREAD.