trigger-dev
Trigger.dev
Trigger.dev is an open-source background jobs platform for TypeScript with durable execution, built-in retries, scheduling, and real-time monitoring.
Documentation
- Docs: https://trigger.dev/llms.txt
- Full Docs: https://trigger.dev/docs/llms-full.txt
Key Capabilities
- Durable waits:
wait.for({ seconds: 30 }),wait.until({ date }), andwait.forToken()suspend execution without consuming timeout — the run resumes after the wait, not a new invocation. - No default timeout: Tasks have no built-in timeout. Set
maxDurationper task or globally in config if a limit is needed. - Batch triggering:
tasks.batchTrigger()accepts up to 1,000 items in a single call. - Child tasks with results:
childTask.triggerAndWait()suspends the parent until the child completes and returns a typed Result object — check.okbefore accessing.output, or call.unwrap(). - Lifecycle hooks:
onStart,onSuccess,onFailure, andinitin config handle cross-cutting concerns without modifying task code. - Build extensions:
@trigger.dev/build/extensionsprovides first-party support for Prisma, FFmpeg, Playwright, and system packages — use instead of manual Docker layers.
Best Practices
- Never wrap
triggerAndWaitorbatchTriggerAndWaitinPromise.all— this pattern is explicitly unsupported and will cause failures. - Every task must be exported from its file. Non-exported tasks are silently ignored and will not run.
- Use
AbortTaskRunErrorto fail a run without retrying (e.g., for validation failures). Throwing any other error triggers the retry policy. - Each Trigger.dev environment (dev, staging, prod) has its own
TRIGGER_SECRET_KEY— using the wrong key triggers runs in the wrong environment with no obvious error. processKeepAlivereduces cold starts but the process can be killed at any time; do not rely on in-memory state persisting between task runs.
More from mikkelkrogsholm/dev-skills
meilisearch
Meilisearch — fast, open-source search engine with typo tolerance, faceted search, and AI-powered hybrid search. Use when building with Meilisearch or asking about its index configuration, search parameters, filters, facets, API keys, geosearch, ranking rules, or integration with JavaScript/TypeScript clients. Fetch live documentation for up-to-date details.
42zod
Zod — TypeScript-first schema validation with static type inference. Use when building with Zod or asking about schema definitions, type inference, parsing, transformations, refinements, coercion, error handling, or integration with forms, APIs, or tRPC. Fetch live documentation for up-to-date details.
10bun
Bun — fast all-in-one JavaScript/TypeScript runtime, package manager, bundler, and test runner. Use when building with Bun, running TypeScript, managing packages with bun install, writing tests with bun test, or asking about Bun APIs, configuration, or Node.js migration. Fetch live documentation for up-to-date API details.
9better-auth
Better Auth — framework-agnostic authentication and authorization framework for TypeScript. Use when building with Better Auth or asking about its APIs, configuration, plugins, session management, OAuth, or integration. Fetch live documentation for up-to-date details.
7react
React — JavaScript library for building user interfaces with components. Use when building with React or asking about hooks, state management, effects, Server Components, Suspense, or any React APIs, patterns, or configuration. Fetch live documentation for up-to-date details.
7vite
Vite — next-generation frontend build tool with instant dev server and optimized production builds. Use when building with Vite or asking about its APIs, configuration, plugins, SSR, environment variables, or integration with frameworks. Fetch live documentation for up-to-date details.
6