1

When I read the documentation for azure WebJobs, it found below statement For Continuous WebJobs to run reliably and on all instances refer to image below enter image description here

My WebJob workflow:

Need to prepare the report for the newly created user in my application at 12 AM EST and send me the report in Email in daily occurrence.This time is changeable by UI so I need to run job continuously to find and run schedule at selected time

My Question

If WebJob runs all instance say two instances in running now for my web app.

  1. Will I receive two email such that WebJob in each instance prepare the report and send to me?
  2. Will get only one email irrespective of how many WebJobs are running?
Mahendran
  • 478
  • 7
  • 19

1 Answers1

4

A Continuous WebJob by default runs on all instances of your App Service Plan.

Whether your WebJob will run twice depends on how you implemented it. A Service Bus Queue listening WebJob will only run a queue message once, no matter how many instances (though if it fails, it'll run more than once).

If you wish, you can also make the WebJob run on a single instance by including a settings.job file in your WebJob with the following content:

{
  "is_singleton": true
}
juunas
  • 41,356
  • 5
  • 86
  • 118