Reputation: 427
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.
Upvotes: 3
Views: 424
Reputation: 43203
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.
Upvotes: 4