# Work That Runs After the Response

FastAPI's BackgroundTasks runs a function after the answer has gone, so a caller never waits for a confirmation message or a log entry, 202 Accepted says slow work has been taken on, and a job queue such as Celery or RQ is what keeps work safe when it must survive a restart.

![Cheat sheet: Work That Runs After the Response](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/0738d3f398ea416b9cd9d53333af9f99.webp)

- Category: FastAPI
- Level: Freelancer
- Tags: 202 Accepted, Background Tasks, fastapi, Job Queue (python), rest-api
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-background-tasks-cheat-sheet
