What it does
Trigger.dev provides a platform for background tasks, scheduled work, and multi-step workflows. The SDK defines tasks in application code and connects them to worker execution.
Why it’s interesting
Moving long work out of an HTTP request improves responsiveness, while retries require deliberate handling of side effects and idempotency.
Real-world use case
Process an uploaded document asynchronously, recording progress while a worker extracts and indexes it.
What I can learn
- 01
Durable background task execution
Learn how task state and step results persist across retries, allowing long-running work to continue after interruptions.
- 02
Typed payloads across trigger and worker boundaries
Trace how task payload types are shared between the application that triggers a job and the separate worker that executes it.
- 03
Tracing and retry behavior
See how run traces connect task steps, logs, failures, and retries to make asynchronous work easier to debug.
One thing to explore
Task definitions and runtime
Follow the packages implementation and connect it to the concepts above.
Explore the source (opens in a new tab)10-Minute Challenge
Create a minimal task
Before you start: Node.js and a Trigger.dev project; current SDK versions may differ from older v3 examples.
- Initialize Trigger.dev using the current CLI.
- Add a task that accepts a message and returns a result.
- Run the local development worker and trigger the task from the generated example.
npx trigger.dev@latest initnpx trigger.dev@latest dev