Reputation: 9
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
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.')
I have deployed the above function into azure portal successfully. check below:
The function triggered successfully in azure portal as well. check below invocation traces in monitor section:
Upvotes: 0