codingguy
codingguy

Reputation: 9

Timer Trigger Azure Function App not firing on hourly schedule

Problem: Deployed Azure Function app is not firing on hourly CHRON schedule I have configured.

What I've done

Note: I'm using Premium app service plan so I don't have the options to set "Always On" configuration setting

Upvotes: 0

Views: 239

Answers (1)

Pavan
Pavan

Reputation: 1391

I have created Timer trigger function with runtime stack python, and I have set the schedule 1 hour by using CRON expression.

While creating function app in portal I have took appservice premium plan and region east US.

Below code is working fine.

Code:

import logging
import azure.functions as func

app = func.FunctionApp()

@app.schedule(schedule="0 0 */1 * * *", arg_name="myTimer", run_on_startup=True,
            use_monitor=False)
def timer_trigger(myTimer: func.TimerRequest) -> None:
    if myTimer.past_due:
        logging.info('The timer is past due!')

    logging.info('Python timer trigger function executed.')

enter image description here

I have deployed the above function into azure portal successfully. check below:

enter image description here

The function triggered successfully in azure portal as well. check below invocation traces in monitor section:

enter image description here

  • If you still face the same issue, check logs, telemetry files and if then also doesn't solve, I suggest you raise a support request.

Upvotes: 0

Related Questions