WPFUser
WPFUser

Reputation: 403

How do I create startup code for longrunning azure functions?

I plan to create a functions project that is always running, but responds to multiple triggers as per azure functions.

I know this can be done with webjobs, but can it be done with functions? If so how do I hook up a startup file as entry point for the longrunning (blocking) background task?

Upvotes: 1

Views: 1067

Answers (2)

sebastian87
sebastian87

Reputation: 484

Please note, that Azure functions have a runtime hard limit of 10 minutes: https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale.

That means, you should plan your function to only react to the different events, process it and is then disposed. Depending on your use case, you should consider other options - maybe you can tell some more about the goal you want to achieve.

Upvotes: 2

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35134

The exact point of Azure Functions is that they only run in response to events. If no events occur, they don't run.

Functions are not a good match for always-running background processes.

Upvotes: 6

Related Questions