1

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

  • 3 of them fire every hour at 5 past the hour (0 5 * * * *)
  • 1 of them fires every night at midnight (0 0 0 * * *)
  • 1 of them fires on a Monday at 8am (0 0 8 * * Mon)
  • And the final one is supposed to fire at 1am every morning (0 0 1 * * *) but isn't

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?

9
  • I have the same issue with Consumption Plan / Function App and Timer + EventHub triggers. If the App is not active those triggers are not fired. When I trigger a HttpRequest in the App, it comes "alive" and the other triggers run for a while. MS Support suggested to completely delete and re-deploy the Function App. That helped for a while. I will move to App Service Environment and hence a dedicated plan soon and there the problem should not occur. Other idea I had: fire an empty Web Test/Http Request frequently with AppInsights. But these are all workarounds - root cause not solved. Commented Feb 22, 2017 at 11:30
  • Would either/both of you mind sharing your function app names either publicly or secretly. I can dig into the logs and see if I can figure out what's happening. Commented Feb 22, 2017 at 14:16
  • tht-test-function Commented Feb 22, 2017 at 15:14
  • In the proximity of dummy42 is a adm function app. this has a 1 minute triggered Check-QueueStatus function.The behavior changed: In Monitor it shows me it has been triggered a day ago. Looking into KUDU / Web Jobs Dashboard / Functions the same function is displayed with 2 instances. One a day ago and one up-to-date minutely. Commented Feb 23, 2017 at 4:24
  • Changing it to 2am did the trick this morning, but it's left me not sure I can trust Azure Functions. My plan was to migrate all my webjobs to functions, but I think I need to spend more time testing first. Commented Feb 23, 2017 at 9:35

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I have another example of a function not running: same account, function app with m2 in the name and the function in question is called ComparisonTest. It should have run at midnight, but the logs show it didn't. Can you confirm if this is due to the same issue?
Yes, it looks like it's the same issue. Thanks for the info, this helps confirm it.
0

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.

3 Comments

Ok but in that case, be aware that your schedule is based on UTC time. Could this be why it doesn't run when you expect?
Good point, but the midnight one ran fine, and since I've changed it to 2am it seems to work okay.
When you say it runs fine, do you mean based on UTC time or your own time zone? Should only be former. It has no idea what your time zone is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.