AZ-204 · Question #187
You are developing an Azure Function App that generates end of day reports (or retail stores. All stores dose at 11 PM each day. Reports must be run one hour after dosing. You configure the function…
The correct answer is A. Configure the Azure Function to run in the West US region. To ensure an Azure Function's Timer trigger runs at midnight in the Pacific Time zone, configuring the function app to run in the West US region aligns its default timezone with Pacific Time, resolving the premature execution issue.
Question
Options
- AConfigure the Azure Function to run in the West US region.
- BAdd an app setting named WEBSITE_TIME_ZONE that uses the value Pacific Standard Time
- CChange the Timer trigger to run at 7 AM
- DUpdate the Azure Function to a Premium plan.
How the community answered
(52 responses)- A85% (44)
- B10% (5)
- C2% (1)
- D4% (2)
Why each option
To ensure an Azure Function's Timer trigger runs at midnight in the Pacific Time zone, configuring the function app to run in the West US region aligns its default timezone with Pacific Time, resolving the premature execution issue.
By configuring the Azure Function to run in the West US region, the function's default timezone will be Pacific Time (UTC-8). This ensures that a Timer trigger scheduled for midnight (00:00) will execute at midnight in the Pacific Time zone, aligning with the requirement for reports to run one hour after stores close at 11 PM Pacific Time.
Adding an app setting `WEBSITE_TIME_ZONE` does not reliably change the execution time for a Timer trigger, as Timer triggers are fundamentally UTC-based.
Changing the Timer trigger to run at 7 AM (UTC) would mean it runs at 11 PM Pacific Time (UTC-8), which is still before the required midnight Pacific Time execution.
Updating to a Premium plan provides enhanced features and dedicated compute but does not inherently change how Timer triggers interpret time zones or fix scheduling issues.
Concept tested: Azure Functions Timer trigger timezones
Source: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp#ncrontab-time-zones
Topics
Community Discussion
No community discussion yet for this question.