AZ-204 · Question #104
You are developing an Azure Function App that runs in an App Service Plan. The Azure Function is triggered by a Timer object. You observe that the Azure Function does not reliably trigger when…
The correct answer is A. Verify that Always On is enabled. C. Ensure that the function has a retry configured. To ensure reliable triggering of an Azure Function with a Timer trigger on an App Service Plan, enable Always On and configure retry policies.
Question
Options
- AVerify that Always On is enabled.
- BModify the trigger to use a SignaIR trigger.
- CEnsure that the function has a retry configured.
- DModify the trigger to use Consumption mode instead of the App Service plan.
How the community answered
(28 responses)- A75% (21)
- B7% (2)
- D18% (5)
Why each option
To ensure reliable triggering of an Azure Function with a Timer trigger on an App Service Plan, enable Always On and configure retry policies.
For Azure Function Apps hosted on an App Service Plan (excluding Consumption plan), 'Always On' must be enabled to prevent the app from idling out, ensuring that Timer triggers reliably execute at their scheduled times.
Modifying the trigger to use a SignalR trigger is incorrect because SignalR is designed for real-time communication, not for scheduled, time-based function execution.
Configuring a retry policy for the function enhances reliability by automatically retrying execution if the initial trigger attempt or subsequent function logic fails, helping to ensure that scheduled tasks eventually complete successfully.
Modifying the trigger to use Consumption mode instead of the App Service plan changes the hosting model entirely, rather than addressing reliability within the current App Service plan configuration.
Concept tested: Azure Function reliability with Timer triggers on App Service Plans
Source: https://learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal#always-on
Topics
Community Discussion
No community discussion yet for this question.