trigger-tasks
Durable background tasks with automatic retries, queuing, scheduling, and observability for AI agents and workflows.
- Create tasks with built-in retry logic, exponential backoff, and error handling; supports schema validation with Zod for type-safe payloads
- Trigger tasks from backend code or within other tasks, with options for fire-and-forget, wait-for-result, or batch processing up to 1,000 items
- Manage concurrency and queuing per-task or per-tenant, debounce rapid triggers, and enforce idempotency to prevent duplicate work
- Schedule recurring tasks with cron expressions and timezone support, or create dynamic multi-tenant schedules on demand
- Track progress and metadata in real-time, tag runs for filtering, and scale compute with machine presets from micro to large-2x configurations
Trigger.dev Tasks
Build durable background tasks that run reliably with automatic retries, queuing, and observability.
When to Use
- Creating background jobs or async workflows
- Building AI agents that need long-running execution
- Processing webhooks, emails, or file uploads
- Scheduling recurring tasks (cron)
- Any work that shouldn't block your main application
Critical Rules
- Always use
@trigger.dev/sdk— never use deprecatedclient.defineJob - Check
result.okbefore accessingresult.outputfromtriggerAndWait() - Never use
Promise.allwithtriggerAndWait()orwait.*calls - Export tasks from files in your
trigger/directory
More from triggerdotdev/skills
trigger-config
Configure Trigger.dev projects with trigger.config.ts. Use when setting up build extensions for Prisma, Playwright, FFmpeg, Python, or customizing deployment settings.
1.4Ktrigger-agents
AI agent patterns with Trigger.dev - orchestration, parallelization, routing, evaluator-optimizer, and human-in-the-loop. Use when building LLM-powered tasks that need parallel workers, approval gates, tool calling, or multi-step agent workflows.
1.4Ktrigger-setup
Set up Trigger.dev in your project. Use when adding Trigger.dev for the first time, creating trigger.config.ts, or initializing the trigger directory.
1.4Ktrigger-realtime
Subscribe to Trigger.dev task runs in real-time from frontend and backend. Use when building progress indicators, live dashboards, streaming AI/LLM responses, or React components that display task status.
1.4Ktrigger-cost-savings
Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Requires Trigger.dev MCP tools for run analysis.
941tasks
Build AI agents, workflows and durable background tasks with Trigger.dev. Use when creating tasks, triggering jobs, handling retries, scheduling cron jobs, or implementing queues and concurrency control.
3