question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timer Function on Consumption plan stops tiggering

See original GitHub issue

I 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

  1. Create a function app with ARM templates (see arm used setting below)

  2. Deploy the a timer function app with cron schedule 0 24 * * * * (deployed from vsts with Azure App Service Deploy)

  3. 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:closed
  • Created 7 years ago
  • Comments:28 (13 by maintainers)

github_iconTop GitHub Comments

5reactions
jhoerrcommented, Feb 16, 2017

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:

  • My function app name is iga-tracker-functions.
  • My function app is on the Consumption plan.
  • The app was created on the portal and is continuously deployed via GitHub
0reactions
davidebbocommented, Feb 25, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Azure Function with Timer trigger suddenly stops ...
All functions are on Consumption plan. Anybody knows what can cause this and how to prevent it? It fails silently, there are no...
Read more >
Azure Function, Timer Trigger suddenly stops firing
The Funtion app works perfectly fine and suddenly stops firing. This has happened in two instances and both the times, a simple act...
Read more >
Azure Functions: timer job doesn't fire when it should
We have created a Function that should be triggered on schedule, once every day. It's a typical case for use of a [TimerTrigger]...
Read more >
How come my Azure timer function app stops firing
I have found that Azure Timer trigger Functions will fail to fire unless you use the B1 or higher app service plan. They...
Read more >
Azure Function seems to be in idle
Hi, We are running consumption based plans on Linux and we have some issues with service bus messages not being picked up properly....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found