Timer Function on Consumption plan stops tiggering
See original GitHub issueI have a Timer Function with a Consumption service plan. When I schedule the function to run once every hour it seems to stop after a few hours of running.
Repro steps
Provide the steps required to reproduce the problem
-
Create a function app with ARM templates (see arm used setting below)
-
Deploy the a timer function app with cron schedule 0 24 * * * * (deployed from vsts with Azure App Service Deploy)
-
Check once in while that if the timer is triggered.
Expected behavior
The Timer Function keeps running every hour
Actual behavior
After some hours the timers stops. This weekend it did not run till I opened the monitoring this morning and it started running again.
Known workarounds
It seems that when the interval is smaller (5 min) it keeps working. However this can also be because I do not know why it stops when using an hour.
Related information
- Programming language used
- Links to source
Arm templates: Microsoft.Web/serverfarms:
{
"name": "[variables('service_plan_name')]",
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "Y1",
"tier": "Dynamic",
"size": "Y1",
"family": "Y",
"capacity": 0
},
"kind": "functionapp",
"apiVersion": "2015-08-01",
"location": "[resourceGroup().location]",
"properties": { "name": "[variables('service_plan_name')]" }
}
Microsoft.Web/sites:
{
"type": "Microsoft.Web/sites",
"kind": "functionapp",
"name": "[parameters('functionapp_name')]",
"apiVersion": "2015-08-01",
"location": "[resourceGroup().location]",
"properties": {
"name": "[parameters('functionapp_name')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('service_plan_name'))]",
"siteConfig": {
"appSettings": "[variables('appsettings')]"
}
}
}
where variable appsetting:
"appsettings":[
{ "name": "FUNCTIONS_EXTENSION_VERSION", "value": "~1" },
{ "name": "AzureWebJobsDashboard", "value": "[parameters('storage_connectionstring')]" },
{ "name": "AzureWebJobsStorage", "value": "[parameters('storage_connectionstring')]" },
{ "name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "6.5.0" }
]
cron expression in timer: “schedule”: “0 24 * * * *”
The code for the Timer is in C#
Issue Analytics
- State:
- Created 7 years ago
- Comments:28 (13 by maintainers)
Top GitHub Comments
I’m seeing this behavior too, much as described here. I would like my function to be executed once a day, however the timer is never triggered. If I modify the timer from the portal to something in the near-future (say 10 or 20 minutes from now) the timer triggers as expected. However if I set it to something further out (say 4 hours from now) the timer does not trigger.
Other notes:
iga-tracker-functions
.@shudson302 there are no known issues related to timer triggers. But what you describe sounds unrelated to timers, so I suggest opening a separate issue.