2
votes

I am trying to deploy a triggered webjob and schedule it with settings.json file. My webapp runs in 3 instances so I assume the webjob will be deployed in 3 instances. So if I schedule the webjob with settings.json file with cron expression will the job run in all the instances? I am assuming that setting the "is_singleton" to true will make it run only on one instance? But if the instance in which it is running fails, will Azure failover the webjob in spite of the is_singleton setting?

1

1 Answers

6
votes

You shouldn't need to use is_singleton in this case. For each schedule occurence, the runtime will pick an instance at random and run your job. Each schedule occurrence will run on one instance only, as you would expect.

If a schedule occurrence is missed or fails, the runtime will try to get back on schedule by running the function again. You can see that logic in the source here.