Investigating and reporting issues with timer triggered functions not firing

Mathew Charles edited this page Jun 22, 2018 · 8 revisions

If you're in a situation where you have a timer triggered function that is either not firing at all, or not firing at the right times, there are a few things to look at.

Is your Function App running in Consumption mode, or in an App Service Plan?

If it's in an App Service Plan, you need to make sure that Always On is enabled. It is enabled by default on Function Apps, but it's good to double check.

In Consumption mode, there is no such thing as Always On. Instead, your Function App should be automatically woken up when a timer is due. For this to work, your triggers need to be 'synced', which normally happens automatically in various scenarios:

  • If you're using the portal to make a change to a function
  • If you deploy your Function App using msdeploy, Kudu git deploy, or Kudu's zipdeploy (/api/zipdeploy)
  • If you click the little Refresh icon next to your Function App name in the Portal

Note that triggers do not get synced if you:

  • Upload files using FTP
  • Manually change files using App Service Editor
  • Upload files using the zip API (/api/zip). This is not a supported deployment API. Do not try to use it fr your function files!

Also note that if you are deploying from VSTS, it might be using one of the options mentioned above that do not sync. Check your deployment configuration - you might need to enable webdeploy (aka msdeploy):

image

Be aware of the time zone

By default, the schedule uses UTC time, so be aware of this when setting a daily schedule (it doesn't matter if it fires hourly).

You can change this to us a specific time zone by setting WEBSITE_TIME_ZONE. See here for more info.

Additional Troubleshooting

There are some additional troubleshooting details here.

Reporting your issue

If you cannot figure out the problem, you can get help on StackOverflow or on the Functions Forum. Please make sure to include the following information so we can help you more efficiently:

  1. Are you using Consumption or App Service Plan
  2. If Consumption, how did you deploy? If App Service Plan, do you have Always On enabled?
  3. Are you using the v1 runtime, or the v2 (Preview) runtime?
  4. Are you setting WEBSITE_TIME_ZONE?
  5. What is your CRON expression set to, and what is your expectation about what it means. e.g. state "I expect it to fire every thursday at 14:17". In some cases, users just misunderstand the CRON syntax, and have incorrect expectations about the semantics of a particular expression.
  6. Give a specific UTC time at which you expected your function to get called, and found that it wasn't. Also, explain how you are determining that it is not getting called. If some cases, the function may get called, but it may not be obvious due to some logging issue.
  7. And most importantly, include a sample invocation ID so we can find your app and look into the issue. Follow these instructions to see how to share this.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.