Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
TimerTrigger fires at unexpected times when RunOnStartup = true #315
When RunOnStartup = true the Timer Trigger seems to fire every time a host is started / restarted.
I would expect this to fire when manually starting / restarting the Azure Function through the Portal. I would also expect this to fire every time a new version is deployed. It seems that it fires many whenever the engine restarts a host or moves to a different host. If this is the expected behavior please make all trigger conditions very clear in the documentation.
I have attached a screenshot of App Insights events during one of the unexpected runs.
I was confused by the documentation. The term "startup" appears to be overloaded. I assumed that the "initial startup run" mentioned in the docs above referred to the overall function app startup/deploy and not the startup on a new server after the app is migrated.
It would also be useful to allow a function to be run a single time after the user manually clicks the "start" or "restart" buttons in the Azure portal without causing a run after each back-end server migration.
Please consider clarifying the documentation. One thought:
Yeah makes sense, I think this is one of those cases where the fact that webjobs attributes can be used for both webjobs and functions makes things confusing. We can't have one set of XML documentation that appears for webjobs and another that appears for functions.