Richard Butterwood
Richard Butterwood

Reputation: 745

How to run Azure Function without a binding

Is it possible for an Azure Function to run without a binding (timer, topic, queue, HTTP) etc?

My Azure Function is a process that I want to run continuously in a loop without it completing, unless the Azure Function is stopped through the U.I.

I could have the Azure Function run off a timer trigger that runs every day and let the Azure Function complete after 23 hours and 59 minutes but I'd prefer not to take that approach.

Upvotes: 3

Views: 2226

Answers (2)

Elliott
Elliott

Reputation: 2205

Azure's Durable Functions, which are in Preview may be able to achieve this:

See pattern #4, Stateful singletons: https://learn.microsoft.com/en-us/azure/azure-functions/durable-functions-overview

While Durable Functions is not an implementation of the actor model, orchestrator functions do have many of the same runtime characteristics. For example, they are long-running (possibly endless), stateful, reliable, single-threaded, location-transparent, and globally addressable. This makes orchestrator functions useful for "actor"-like scenarios.

Upvotes: 2

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35134

No, Functions are not intended for long running processes.

If your Function App is on Consumption Plan, each execution is going to be killed after 10 minutes max.

On fixed plan your workaround might work. Still I would suggest using regular continuous App Service web jobs instead, since Functions provide no added value for your scenario.

Upvotes: 1

Related Questions