Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scheduler in Azure Function

I have the following function.json for my Azure Function which triggers at the particular time as set.

{
  "disabled": false,
  "bindings": [
    {
      "authLevel": "function",
      "name": "req",
      "type": "httpTrigger",
      "direction": "in",
      "schedule": "* 30 10 * * *"
    },
    {
      "name": "$return",
      "type": "http",
      "direction": "out"
    }
  ]
}

I need to schedule another trigger with different time, but for the same Azure Function. Is it possible to add multiple triggering time for same function? If not, then please suggest an alternative way to do so.

like image 886
Raj Avatar asked Mar 18 '26 00:03

Raj


1 Answers

You cannot add more than one trigger to a function. However, you can solve it by putting the relevant code in a helper method, and then have two different functions call out to the helper. It's a small additional pain, but it will avoid duplicating any key logic.

like image 191
David Ebbo Avatar answered Mar 19 '26 13:03

David Ebbo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!