0

I have an azure timer trigger function hosted in an app service plan (I3 : 5)

By default app service plan instance count has been set to 5

So whenever timer trigger starts, it is starting from all the five instances parallelly.

I want to restrict the timer trigger running to a single instance.

I made the below line of code on top of the timer trigger function name

[Singleton(Mode = SingletonMode.Listener)]

But it is not restricting to single Instance. Again timer trigger running in all the 5 instances.

Appreciate your comments and answers.

thevan
  • 10,052
  • 53
  • 137
  • 202

1 Answers1

0

The documentation clearly says

If a function app scales out to multiple instances, only a single instance of a timer-triggered function is run across all instances. It will not trigger again if there is an outstanding invocation is still running.

If you are observing a different behavior, it may mean that something may have not been setup/configured properly.

Julien Jacobs
  • 2,561
  • 1
  • 24
  • 34