Documentation Index
Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
Start a background task worker
To start a worker to run background tasks for a single function, define a task and call.serve() on it.
Trigger a background task
To trigger a background task, call.delay() on the same task in a different terminal.
Start a worker to run background tasks for multiple functions
To start a worker to run background tasks for multiple functions, callserve() with the tasks you want to run.
Submit multiple background tasks
To submit multiple background tasks, call.map() on the task with deferred=True.
unmapped to the mapped argument.
Further reading
- How to deploy a web application with Prefect background tasks
- Prefect Background Task Examples repository for reference implementations of applications leveraging background tasks.