littlecharva
littlecharva

Reputation: 4244

Azure Function on Time Trigger not firing

I have an Azure Function setup on a Consumption plan which contains 6 individual Timer Triggered functions.

They are all copies of the same application, but do different things depending upon the command line arguments. They're triggered by a Run.ps1 Powershell script which contains the appropriate command line args.

Yesterday at 09:40 I tried running the problem function manually and it ran, so I changed the schedule to (0 0 11 * * *) and it ran at 11am as expected. So I changed the schedule back to (0 0 1 * * *) but at 1am this morning it didn't run :(

enter image description here

I'm going to try changing the schedule so that it runs at 2am in case there's something causing an issue at 1am, but other than than what else can I try?

Upvotes: 1

Views: 12494

Answers (2)

brettsam
brettsam

Reputation: 2792

I think you may be hitting an issue with how we calculate if your timer is past due. I've filed the issue here: https://github.com/Azure/azure-webjobs-sdk-extensions/issues/194.

In the logs that I looked through, I saw that your function app restarted just before 1am due to a change to a function.json file. When it came back up, it was past 1am (which should have caused it to run), but because it had never run before, we recalculated the 'next' time incorrectly.

I'm looking into a fix for this -- you can follow along with the link above.

If you or @KaiWalter see more instances of missing function invocations, let me know so I can validate that this is what's happening.

Upvotes: 2

David Ebbo
David Ebbo

Reputation: 43183

If your Function App specifies a non-default time zone (using APPSETTING_WEBSITE_TIME_ZONE), you are likely running into a known issue: https://github.com/Azure/azure-webjobs-sdk-script/issues/995.

The fix to that issue has started to deploy, and deployment should complete by end of week.

Upvotes: 0

Related Questions