0

I have an Azure web job and want to set it to run every 15 minutes in the morning session and every 30 minutes in the evening session

I'm deploying my web job using Visual Studio and I already have my settings.job file. My problem is that when I set up to run every 15 or 30 minutes, it works perfectly, but I really wants to run every 15 minutes in the morning session and every 30 minutes in the evening session.

Thanks in Advance

Rejeesh
  • 1,236
  • 12
  • 15

1 Answers1

1

I'm assuming you are using CRON expressions. I don't know if you can give one app two different schedules. But you could deploy the app twice with a different schedule for each.

Morning schedule

0 */15 9-17 * * *

Evening schedule

0 */30 17-20 * * *

These schedule are untested, but I think they look about right

James Wood
  • 17,286
  • 4
  • 46
  • 89
  • Yes, I am using Cron expressions. I want two different schedules for one application. Instead of deploying twice is there any another method for scheduling the same in one application? – Rejeesh Apr 19 '18 at 05:27
  • 1
    Are you using `TimerTrigger` ? If so you just need 2 timertrigger functions and call the same code from both functions ? – Thomas Apr 22 '18 at 07:31