Courseiva
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You are developing a solution that needs to run a background task every 10 minutes to clean up temporary files in Azure Blob Storage. You want to use Azure Functions with the Consumption Plan to minimize cost. Which trigger type should you use?

⚠ Common exam trap

It's easy for candidates to confuse BlobTrigger (event-driven on blob changes) with a scheduled cleanup task, not realizing that TimerTrigger is the only trigger that natively supports recurring time-based execution without external dependencies.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

TimerTrigger

B is correct because TimerTrigger is designed for scheduled execution of background tasks at fixed intervals, such as every 10 minutes. It uses a cron expression to define the schedule and runs on the Consumption Plan, which scales to zero when idle, minimizing cost. This makes it the ideal choice for periodic cleanup of temporary files in Azure Blob Storage.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • HTTPTrigger

    Why it's wrong here

    An HTTPTrigger initiates an Azure Function execution in response to an incoming HTTP request, typically a web hook or API call. While it can be invoked programmatically, it does not inherently provide a scheduling mechanism for background tasks. Therefore, relying on an external system to repeatedly call an HTTP-triggered function for a scheduled background task is inefficient and not the intended design pattern for periodic execution.

  • TimerTrigger

    Why this is correct

    The TimerTrigger is the appropriate choice for executing Azure Functions on a predefined schedule, making it ideal for background tasks that need to run periodically. It leverages CRON expressions, allowing developers to specify precise execution intervals, such as every 10 minutes, daily, or on specific days of the week. This trigger is purpose-built for reliable, time-based task automation without requiring external orchestration.

  • BlobTrigger

    Why it's wrong here

    A BlobTrigger activates an Azure Function whenever a new blob is added to a specified Azure Storage container or an existing blob is updated. This trigger is fundamentally event-driven, designed to process data as it arrives in blob storage, rather than executing on a fixed time schedule. Consequently, it is unsuitable for implementing a background task that requires periodic execution independent of storage events.

  • ServiceBusTrigger

    Why it's wrong here

    The ServiceBusTrigger initiates an Azure Function when one or more messages are delivered to a specified Azure Service Bus Queue or Topic. This trigger is designed for message-driven architectures, enabling asynchronous processing of messages as they become available. It does not provide any inherent scheduling capabilities and would only execute if an external system explicitly sends messages to the Service Bus, making it inappropriate for a purely time-scheduled background task.

Quick reference

Azure Blob Storage Tier Comparison

TierStorage CostRetrieval CostLatencyUse Case
HotHighestLowestImmediateActive data, frequent reads
CoolLowerHigherImmediateData accessed < once / month
ColdLower stillHigherImmediateData accessed < once / quarter
ArchiveLowestHighest + rehydration delayHoursLong-term compliance retention

Go deeper

Related to this question

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.