azure function(python) Timer trigger function only triggers when opening azure portal or when app gets http trigger

Sujit Maharjan 1 Reputation point
2020-06-05T16:57:43.79+00:00

I am trying run a timer triggered azure function but its only triggers when I open the azure portal or the another function of the app gets the http trigger.

Executing 'Functions.notification' (Reason='Timer fired at 2020-06-05T06:25:14.9220161+00:00', Id=2bb79f08-d123-4316-93a4-072168c9ad3e)
Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2020-06-05T00:45:00.0000000+00:00
Python timer trigger function ran at 2020-06-05T06:25:17.762274+00:00

Runtime verson:3.0.13353.0
Python versoin:3.6
Consumption plan.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,434 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 24,411 Reputation points Microsoft Employee
    2020-06-10T16:04:25.797+00:00

    One of the first things I'd recommend is to check is runOnStartup and make sure that is set to false:
    https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=python#configuration

    Another thing I would look into if the function is firing more often than expected, is the possibility that it is triggering faulty IsPastDue logic. There is a great write-up on this where the short term work around was to run the function in its own AppServicePlan with no scale out configuration:
    https://www.redarris.com/2019/11/16/rogue-timer-triggers.html

    1 person found this answer helpful.
    0 comments No comments