# Background Job

> Work an app hands off to run later, so the user does not have to wait.

**Field:** Software Development  
**Category:** Architecture  
**Also known as:** Background Worker, Async Job, Job Worker

## Think of it like

It is like leaving a coat at the dry cleaner. You get a ticket now and the coat later.

## Definition

A background job is work an app does later, outside the request a user is waiting on. The web app puts a job on a queue and replies at once. A separate worker process takes jobs off the queue and runs them. Sending email, shrinking photos and making reports are common jobs. If a job fails, the worker can try it again.

## Example

When Lucy sends in a video, the site says Processing and lets her keep browsing. A worker makes three smaller copies over the next two minutes.

## Why it matters

Pages stay fast because slow work happens somewhere else. A burst of work waits in the queue instead of crashing the site.

## Common mistake

Writing jobs that break when run twice. Workers retry failed jobs, so each job should be safe to run more than once.

## Three principles

- **Hand it off.** Reply now, work later.
- **Queue and worker.** Jobs wait their turn.
- **Safe to retry.** Run twice, same result.

## Related terms

- [Message Queue](https://learn.benibix.com/term/development/message-queue)
- [Idempotency](https://learn.benibix.com/term/development/idempotency)
- [Cron](https://learn.benibix.com/term/infrastructure/cron)
- [Retry with Exponential Backoff](https://learn.benibix.com/term/development/retry-with-backoff)
- [System Design](https://learn.benibix.com/term/development/system-design)
- [Thread](https://learn.benibix.com/term/development/thread)

![Users on the left send requests to a load balancer. It spreads them over two app servers. The app servers read from a cache and a database. For slow work, an app server drops a job on a queue and replies at once. A worker on the right takes jobs off the queue and runs them later.](https://learn.benibix.com/diagrams/dev6-system-design.svg)

---

Source: https://learn.benibix.com/term/development/background-job
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
