2

I would like to write a c# Azure Function working on a time trigger in which the schedule would be variable, i.e. each function run would determine the time of the next run and thus should be able to change the scheduled time of the next trigger.

1 Answer 1

6

You can use a queue trigger with a queue output for this thanks to the NextVisibleTime property, it's a better choice than attempting to modify the timer schedule every run.

It also supports configurable retries upon failure (and a poison queue) so it's more durable than a timer trigger. (https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue#handling-poison-queue-messages)

Sign up to request clarification or add additional context in comments.

3 Comments

thanks, will implement and revert, question, what happens if the function fails? would it be no next trigger and thus the process stop?
Wondering, is there a similar kind of feature available for Service Bus Topic, where I could process a topic's message by an Azure function based on a time interval?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.