If i have an Azure Function which runs on a timer trigger every 5 minutes, what happens if one run takes more than 5 minutes?
Will the next timer trigger kick off, regardless of any currently executing triggers?
Reason i ask: I need to ensure only 1 Azure Function is running at a time (yes, i know this kind of goes against the concept of functions). If one run takes < 5 minutes (most of the time it should), great - kick off next one at the next 5 minute window. If it doesn't finish, don't kick off.
I'd prefer to use Azure Functions, but in this case - should i just not bother and simply use a continuously running Azure WebJob instead?
Thanks!
As described in the TimerTrigger wiki page:
If your function execution takes longer than the timer interval, another execution won't be triggered until after the current invocation completes. The next execution is scheduled after the current execution completes.
So you should be getting the behavior you're looking for already - only a single function invocation running at any given time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With