-
Notifications
You must be signed in to change notification settings - Fork 448
Investigating and reporting issues with timer triggered functions not firing
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.
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 sync 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!
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.
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:
- Are you using Consumption or App Service Plan
- If Consumption, how did you deploy? If App Service Plan, do you have Always On enabled?
- Are you setting
WEBSITE_TIME_ZONE
? - 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".
- 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.
- 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.
- Configuration Settings
- function.json
- host.json
- host.json (v2)
- Http Functions
- Function Runtime Versioning
- Official Functions developers guide
- Host Health Monitor
- Managing Connections
- Renaming a Function
- Retrieving information about the currently running function
- Site Extension Resolution
- Linux Consumption Regions
- Using LinuxFxVersion for Linux Function apps
- Out-of-proc Cancellation Tokens
- Assembly Resolution in Azure Functions
- ILogger
- Precompiled functions
- Official Functions C# developer reference
- Contributor Onboarding
- Development Process
- Deploying the Functions runtime as a private site extension
- Authoring & Testing Language Extensions
- Bindings in out-of-proc
- Language Extensibility
- Worker Capabilities
- Investigating and reporting issues with timer triggered functions not firing
- Sharing Your Function App name privately
- Azure Functions CLI release notes [moved here]
- Function App Zipped Deployment [deprecated]