Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time triggered azure function to trigger immediately after deploy

I have a time-triggered azure function triggered every 1 hour. My requirement is that, it should get triggered every hour but once also immediately after the deployment ? Is playing with cron expression my only way for this ?

like image 291
Tany Avatar asked Sep 10 '25 10:09

Tany


1 Answers

There isn't something directly tied to the deployment. The runOnStartup setting, documented here, triggers your function when the runtime starts, but won't cause the runtime to start as a result of a deployment.

Your best option would likely be to customize your deployment, as documented here, and invoke your function (by issuing an HTTP request) once the deployment completes. You can share the code and have an HTTP triggered function that uses the same logic as the timer function that runs on a schedule.

like image 58
Fabio Cavalcante Avatar answered Sep 13 '25 01:09

Fabio Cavalcante