Azure function scheduled trigger creates multiple instances

Arave 0 Reputation points
2023-03-08T14:31:29.46+00:00

Azure function scheduled trigger creates multiple instances. My code is written in Node JS. Every time I fire off the function -- whether locally or remotely -- multiple instances are created. I'd only expect one instance.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,205 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,066 Reputation points
    2023-03-10T11:12:06.18+00:00

    @Arave Thanks for reaching out. Can you please confirm how you have confirmed that scheduled trigger creates multiple instances. The timer trigger in Azure Functions creates only one instance of a timer-triggered function, even if the function app scales out to multiple instances. The timer trigger uses a storage lock to ensure that there is only one timer instance. If two function apps share the same identifying configuration and each uses a timer trigger, only one timer runs.

    Reference : https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp#function-apps-sharing-storage

    0 comments No comments