Courseiva
Develop Azure compute solutionseasyMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You are developing a background job that runs every hour on Azure App Service. The job must be resilient to restarts and should not affect the web app's performance. Which technology should you use?

⚠ Common exam trap

Many candidates confuse Azure Functions with WebJobs, not realizing that WebJobs run inside the App Service sandbox and share the same scaling and restart behavior, whereas Functions on the Consumption plan are independent and subject to cold starts and different billing models.

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

WebJobs (triggered)

WebJobs (triggered) are designed specifically for running background tasks on Azure App Service. They run as separate processes from the web app, ensuring they do not affect the web app's performance, and they are resilient to restarts because the Azure WebJobs SDK automatically handles restart and retry logic. This makes them the ideal choice for a scheduled hourly job that must survive App Service restarts.

Answer analysis

Option-by-option breakdown

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

  • A background thread in the web application

    Why it's wrong here

    A background thread within the web application process is highly coupled to the web app's lifecycle. If the web app restarts, scales, or crashes, the background thread will stop, leading to missed executions and lack of reliability for hourly jobs. Furthermore, consuming web application resources for background processing can negatively impact the responsiveness and performance of user-facing requests, making it an unsuitable pattern for reliable, scheduled tasks.

  • Azure Logic Apps

    Why it's wrong here

    Azure Logic Apps are designed for orchestrating complex workflows and integrating disparate systems, often involving multiple services and connectors. While they can be scheduled, using Logic Apps for a simple hourly background job directly tied to an App Service web application introduces unnecessary complexity and overhead. It's an external service that would need to call into the web app, rather than running within the same compute environment, making it less integrated and potentially more costly for this specific scenario.

  • WebJobs (triggered)

    Why this is correct

    Triggered WebJobs are an integral feature of Azure App Service, allowing you to run scripts or executables as background processes within the same App Service plan as your web application. They are ideal for scheduled tasks, as they can be configured to run on a CRON schedule (e.g., hourly) and leverage the existing compute resources without impacting the web app's performance significantly. This provides a highly integrated, cost-effective, and reliable solution for background processing directly alongside the web application.

  • Azure Functions (Consumption plan)

    Why it's wrong here

    Azure Functions on a Consumption plan offer a serverless, event-driven execution model, which is highly scalable and cost-effective for many scenarios. While an hourly timer-triggered function could certainly execute the background job, it runs as a separate serverless compute resource, distinct from the App Service plan hosting the web application. This means it doesn't share the same underlying infrastructure or direct integration benefits that WebJobs provide within the App Service ecosystem, making WebJobs a more cohesive choice when the job is closely related to an existing App Service.

About these practice questions

Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.