# Trigger.dev > Trigger.dev is an open source background jobs framework that lets you write reliable workflows in plain async code. Run long-running AI tasks, handle complex background jobs, and build AI agents with built-in queuing, automatic retries, and real-time monitoring. No timeouts, elastic scaling, and zero infrastructure management required. ## Docs - [Quick start](https://trigger-docs-building-with-ai-improvements.mintlify.site/quick-start.md): How to get started in 3 minutes using the CLI and SDK. - [Manual setup](https://trigger-docs-building-with-ai-improvements.mintlify.site/manual-setup.md): How to manually setup Trigger.dev in your project. - [Video walkthrough](https://trigger-docs-building-with-ai-improvements.mintlify.site/video-walkthrough.md): Go from zero to a working task in your Next.js app in 10 minutes. - [Migrating from v3](https://trigger-docs-building-with-ai-improvements.mintlify.site/migrating-from-v3.md): What's new in v4, how to migrate, and breaking changes. - [Tasks: Overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/tasks/overview.md): Tasks are functions that can run for a long time and provide strong resilience to failure. - [schemaTask](https://trigger-docs-building-with-ai-improvements.mintlify.site/tasks/schemaTask.md): Define tasks with a runtime payload schema and validate the payload before running the task. - [Scheduled tasks (cron)](https://trigger-docs-building-with-ai-improvements.mintlify.site/tasks/scheduled.md): A task that is triggered on a recurring schedule using cron syntax. - [Triggering](https://trigger-docs-building-with-ai-improvements.mintlify.site/triggering.md): Tasks need to be triggered in order to run. - [Runs](https://trigger-docs-building-with-ai-improvements.mintlify.site/runs.md): Understanding the lifecycle of task run execution in Trigger.dev - [MCP Introduction](https://trigger-docs-building-with-ai-improvements.mintlify.site/mcp-introduction.md): Learn how to install and configure the Trigger.dev MCP Server - [MCP Tools](https://trigger-docs-building-with-ai-improvements.mintlify.site/mcp-tools.md): Learn about how to use the tools available in the Trigger.dev MCP Server - [Skills](https://trigger-docs-building-with-ai-improvements.mintlify.site/skills.md): Install Trigger.dev skills to teach any AI coding assistant best practices for writing tasks, agents, and workflows. - [Agent rules](https://trigger-docs-building-with-ai-improvements.mintlify.site/mcp-agent-rules.md): Install Trigger.dev agent rules to guide AI assistants toward correct, up-to-date code patterns. - [Writing tasks: Overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/writing-tasks-introduction.md): Tasks are the core of Trigger.dev. They are long-running processes that are triggered by events. - [Wait: Overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/wait.md): During your run you can wait for a period of time or for something to happen. - [Wait for](https://trigger-docs-building-with-ai-improvements.mintlify.site/wait-for.md): Wait for a period of time, then continue execution. - [Wait until](https://trigger-docs-building-with-ai-improvements.mintlify.site/wait-until.md): Wait until a date, then continue execution. - [Wait for token](https://trigger-docs-building-with-ai-improvements.mintlify.site/wait-for-token.md): Wait until a token is completed using waitpoint tokens. - [Concurrency & Queues](https://trigger-docs-building-with-ai-improvements.mintlify.site/queue-concurrency.md): Configure what you want to happen when there is more than one run at a time. - [Versioning](https://trigger-docs-building-with-ai-improvements.mintlify.site/versioning.md): We use atomic versioning to ensure that started tasks are not affected by changes to the task code. - [Max duration](https://trigger-docs-building-with-ai-improvements.mintlify.site/runs/max-duration.md): Set a maximum duration for a task to run. - [Tags](https://trigger-docs-building-with-ai-improvements.mintlify.site/tags.md): Tags allow you to easily filter runs in the dashboard and when using the SDK. - [Run metadata](https://trigger-docs-building-with-ai-improvements.mintlify.site/runs/metadata.md): Attach a small amount of data to a run and update it as the run progresses. - [Realtime Streams](https://trigger-docs-building-with-ai-improvements.mintlify.site/tasks/streams.md): Stream data in realtime from your Trigger.dev tasks to your frontend or backend applications. - [Usage](https://trigger-docs-building-with-ai-improvements.mintlify.site/run-usage.md): Get compute duration and cost from inside a run, or for a specific block of code. - [Priority](https://trigger-docs-building-with-ai-improvements.mintlify.site/runs/priority.md): Specify a priority when triggering a run. - [Vercel integration](https://trigger-docs-building-with-ai-improvements.mintlify.site/vercel-integration.md): When you deploy to Vercel, automatically deploy your associated tasks. - [Realtime overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/overview.md): Using the Trigger.dev Realtime API to trigger and/or subscribe to runs in real-time. - [How it works](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/how-it-works.md): Technical details about how the Trigger.dev Realtime API works - [The run object](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/run-object.md): The run object schema for Realtime subscriptions - [Realtime authentication](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/auth.md): Authenticating real-time API requests with Public Access Tokens or Trigger Tokens - [React hooks overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/react-hooks/overview.md): Using the Trigger.dev Realtime API from your React applications. - [Trigger hooks](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/react-hooks/triggering.md): Triggering tasks from your frontend application. - [Subscribing to runs](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/react-hooks/subscribe.md): Get live updates from runs, batches, metadata, and more in your frontend application. - [Streams hooks](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/react-hooks/streams.md): Subscribe to real-time streams from your tasks in React components - [SWR hooks](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/react-hooks/swr.md): Fetch and cache data using SWR-based hooks - [useWaitToken](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/react-hooks/use-wait-token.md): Use the useWaitToken hook to complete a wait token from a React component - [Backend overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/backend/overview.md): Using the Trigger.dev realtime API from your backend code - [Subscribe functions](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/backend/subscribe.md): Subscribe to run updates using async iterators - [Streams](https://trigger-docs-building-with-ai-improvements.mintlify.site/realtime/backend/streams.md): Read and consume real-time streaming data from your tasks in your backend - [Run tests](https://trigger-docs-building-with-ai-improvements.mintlify.site/run-tests.md): You can use the dashboard to run a test of your tasks. - [Alerts](https://trigger-docs-building-with-ai-improvements.mintlify.site/troubleshooting-alerts.md): Get alerted when runs or deployments fail, or when deployments succeed. - [Replaying](https://trigger-docs-building-with-ai-improvements.mintlify.site/replaying.md): A replay is a copy of a run with the same payload but against the latest version in that environment. This is useful if something went wrong and you want to try again with the latest version of your code. - [Common problems](https://trigger-docs-building-with-ai-improvements.mintlify.site/troubleshooting.md): Some common problems you might experience and their solutions - [Debugging in VS Code](https://trigger-docs-building-with-ai-improvements.mintlify.site/troubleshooting-debugging-in-vscode.md) - [How to upgrade the Trigger.dev packages](https://trigger-docs-building-with-ai-improvements.mintlify.site/upgrading-packages.md): When we release fixes and new features we recommend you upgrade your Trigger.dev packages. - [Uptime Status](https://trigger-docs-building-with-ai-improvements.mintlify.site/troubleshooting-uptime-status.md) - [GitHub Issues](https://trigger-docs-building-with-ai-improvements.mintlify.site/troubleshooting-github-issues.md) - [Request a feature](https://trigger-docs-building-with-ai-improvements.mintlify.site/request-feature.md) - [Overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/self-hosting/overview.md): You can self-host Trigger.dev on your own infrastructure. - [Docker compose](https://trigger-docs-building-with-ai-improvements.mintlify.site/self-hosting/docker.md): You can self-host Trigger.dev on your own infrastructure using Docker. - [Kubernetes](https://trigger-docs-building-with-ai-improvements.mintlify.site/self-hosting/kubernetes.md): You can self-host Trigger.dev in Kubernetes using our official Helm chart. - [Webapp](https://trigger-docs-building-with-ai-improvements.mintlify.site/self-hosting/env/webapp.md): Environment variables for the webapp container. - [Supervisor](https://trigger-docs-building-with-ai-improvements.mintlify.site/self-hosting/env/supervisor.md): Environment variables for the supervisor container. - [Docker (legacy)](https://trigger-docs-building-with-ai-improvements.mintlify.site/open-source-self-hosting.md): Self-host Trigger.dev on your own infrastructure using Docker. - [Contributing](https://trigger-docs-building-with-ai-improvements.mintlify.site/open-source-contributing.md): You can contribute to Trigger.dev in many ways. - [Roadmap](https://trigger-docs-building-with-ai-improvements.mintlify.site/roadmap.md) - [Overview](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/overview.md): Using the Trigger.dev management API - [Authentication](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/authentication.md): Authenticating with the Trigger.dev management API - [Errors and retries](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/errors-and-retries.md): Handling errors and retries with the Trigger.dev management API - [Auto-pagination](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/auto-pagination.md): Using auto-pagination with the Trigger.dev management API - [Trigger](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/tasks/trigger.md): Trigger a task by its identifier. - [Batch trigger](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/tasks/batch-trigger.md): Batch trigger tasks with up to 1,000 payloads with SDK 4.3.1+ (500 in prior versions). - [Create batch](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/batches/create.md): Phase 1 of 2-phase batch API. Creates a batch record and optionally blocks the parent run for batchTriggerAndWait. After creating a batch, stream items via POST /api/v3/batches/{batchId}/items. - [Stream batch items](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/batches/stream-items.md): Phase 2 of 2-phase batch API. Accepts an NDJSON stream of batch items and enqueues them. Each line in the body should be a valid BatchItemNDJSON object. The stream is processed with backpressure - items are enqueued as they arrive. The batch is sealed when the stream completes successfully. - [List runs](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/runs/list.md): List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more. - [Retrieve run](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/runs/retrieve.md): Retrieve information about a run, including its status, payload, output, and attempts. If you authenticate with a Public API key, we will omit the payload and output fields for security reasons. - [Replay run](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/runs/replay.md): Creates a new run with the same payload and options as the original run. - [Cancel run](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/runs/cancel.md): Cancels an in-progress run. If the run is already completed, this will have no effect. - [Reschedule run](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/runs/reschedule.md): Updates a delayed run with a new delay. Only valid when the run is in the DELAYED state. - [Update metadata](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/runs/update-metadata.md): Update the metadata of a run. - [List Schedules](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/list.md): List all schedules. You can also paginate the results. - [Create Schedule](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/create.md): Create a new `IMPERATIVE` schedule based on the specified options. - [Retrieve Schedule](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/retrieve.md): Get a schedule by its ID. - [Update Schedule](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/update.md): Update a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. - [Delete Schedule](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/delete.md): Delete a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. - [Deactivate Schedule](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/deactivate.md): Deactivate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. - [Activate Schedule](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/activate.md): Activate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. - [Get timezones](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/schedules/timezones.md): Get all supported timezones that schedule tasks support. - [List Env Vars](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/envvars/list.md): List all environment variables for a specific project and environment. - [Import Env Vars](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/envvars/import.md): Upload mulitple environment variables for a specific project and environment. - [Create Env Var](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/envvars/create.md): Create a new environment variable for a specific project and environment. - [Retrieve Env Var](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/envvars/retrieve.md): Retrieve a specific environment variable for a specific project and environment. - [Update Env Var](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/envvars/update.md): Update a specific environment variable for a specific project and environment. - [Delete Env Var](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/envvars/delete.md): Delete a specific environment variable for a specific project and environment. - [Get deployment](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/deployments/retrieve.md): Retrieve information about a specific deployment by its ID. - [Get latest deployment](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/deployments/get-latest.md): Retrieve information about the latest unmanaged deployment for the authenticated project. - [Promote deployment](https://trigger-docs-building-with-ai-improvements.mintlify.site/management/deployments/promote.md): Promote a previously deployed version to be the current version for the environment. This makes the specified version active for new task runs. - [Migrating from Mergent](https://trigger-docs-building-with-ai-improvements.mintlify.site/migration-mergent.md): A guide for migrating from Mergent to Trigger.dev