Explain it simpler
Some programs should run all the time, like a shop that stays open waiting for customers. Others should start, finish one task and stop, like a delivery driver who takes a parcel, delivers it and goes home. Azure Container Apps jobs are for the second kind. A job runs your container until the work is done and then stops, and each run is called an execution. You choose how a job starts: by hand when you ask for it, on a timetable such as 2 a.m. every night, or automatically when work appears, such as new messages waiting in a queue. When the container finishes, it reports 'done' or 'failed' with a simple number called an exit code.
Lucia runs the document assistant at Granite Legal, a retrieval app that answers questions from case files. Every new upload has to be split, embedded and stored as vectors, and the whole index needs a consistency check each night. Right now a container app runs around the clock with a loop that sleeps for a minute, checks for work and sleeps again. It costs money even when nobody uploads anything, a crash halfway through a document leaves no record, and the nightly check is a timer inside the code that drifted by an hour when the clocks changed. The work clearly has a beginning and an end. Is a long-running app really the right shape for it?
A container app is designed to run continuously, or to scale to zero and wake on demand, and to serve requests or process a stream. Some work, though, should run to completion and stop: a nightly report, a database migration, an embedding batch that processes new documents for a retrieval application. Container Apps jobs are built for that. A job runs containers that start, do a finite piece of work and exit, and each run is called an execution. You stop paying when the work is done, and every run has its own record with a status.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.