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 ?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With