A function has a timer trigger set up to run every 5 minutes with the following schedule:
0 1-59/5 * * * *.
It was running consistently every 5 minutes then suddenly stopped for no apparent reason. I was able to get it to start running again by restarting the function app from the Azure portal.
Please provide the following:
0 1-59/5 * * * *The trigger should fire every 5 minutes.
Had an incident where the function app stopped executing with no visible error or cause.
Restarting the function app when it gets stuck
[TimerTrigger("0 1-59/5 * * * *", RunOnStartup = true)]I have related issue. I've got functions with service bus triggers, event hub triggers and storage queue triggers that works just fine. In the same deployment there are also a couple of timer triggers that should fire once every 30 minutes. But they sometime go hours without fireing. No apparent logic in when they work and when the take a long vacation.
Is there a reason you're doing "RunOnStartup"?
We almost never recommend using that, especially on consumption plans. Please see here for details on the attribute: https://github.com/Azure/azure-webjobs-sdk-extensions/issues/315
@mhoeger I only have that set as a development aid so it is easier to run locally. Due to the nature of these functions essentially polling available inputs there isn't really any problem with running "extra" times beyond the scheduled instances, as long as that is the only issue with RunOnStartup on consumptive plans.
It was answered here
long story short - there is an issue right now if you deploy timer based functions that are disabled via app setting then change the app setting to enable them. To work around until the fix is made you should click the 'refresh' button in the Azure portal after changing app settings used for disabling functions.
Most helpful comment
It was answered here
long story short - there is an issue right now if you deploy timer based functions that are disabled via app setting then change the app setting to enable them. To work around until the fix is made you should click the 'refresh' button in the Azure portal after changing app settings used for disabling functions.