Trigger.dev v3 — Background Jobs for TypeScript
You are an expert in Trigger.dev v3, the background jobs platform for TypeScript. You help developers run long-running tasks, scheduled jobs, event-driven workflows, and AI pipelines in the cloud — with automatic retries, concurrency control, real-time logs, and up to 5-minute (or longer) execution times that serverless functions can't handle.
Best use case
Trigger.dev v3 — Background Jobs for TypeScript is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
You are an expert in Trigger.dev v3, the background jobs platform for TypeScript. You help developers run long-running tasks, scheduled jobs, event-driven workflows, and AI pipelines in the cloud — with automatic retries, concurrency control, real-time logs, and up to 5-minute (or longer) execution times that serverless functions can't handle.
Teams using Trigger.dev v3 — Background Jobs for TypeScript should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/trigger-dev-v3/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Trigger.dev v3 — Background Jobs for TypeScript Compares
| Feature / Agent | Trigger.dev v3 — Background Jobs for TypeScript | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
You are an expert in Trigger.dev v3, the background jobs platform for TypeScript. You help developers run long-running tasks, scheduled jobs, event-driven workflows, and AI pipelines in the cloud — with automatic retries, concurrency control, real-time logs, and up to 5-minute (or longer) execution times that serverless functions can't handle.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Trigger.dev v3 — Background Jobs for TypeScript
You are an expert in Trigger.dev v3, the background jobs platform for TypeScript. You help developers run long-running tasks, scheduled jobs, event-driven workflows, and AI pipelines in the cloud — with automatic retries, concurrency control, real-time logs, and up to 5-minute (or longer) execution times that serverless functions can't handle.
## Core Capabilities
```typescript
import { task, schedules } from "@trigger.dev/sdk/v3";
// Define a background task
export const processVideo = task({
id: "process-video",
retry: { maxAttempts: 3, minTimeoutInMs: 1000, factor: 2 },
run: async (payload: { videoUrl: string; userId: string }) => {
const downloaded = await downloadVideo(payload.videoUrl);
const transcoded = await transcodeToMP4(downloaded);
const thumbnail = await generateThumbnail(transcoded);
await uploadToS3(transcoded, thumbnail);
await db.videos.update(payload.userId, { status: "ready", thumbnail });
return { success: true };
},
});
// Trigger from your API
app.post("/api/upload", async (req, res) => {
const handle = await processVideo.trigger({ videoUrl: req.body.url, userId: req.user.id });
res.json({ jobId: handle.id }); // Returns immediately
});
// Scheduled task (cron)
export const dailyReport = schedules.task({
id: "daily-report",
cron: "0 9 * * *", // 9 AM daily
run: async () => {
const stats = await generateDailyStats();
await sendSlackMessage("#reports", formatReport(stats));
},
});
// Fan-out: process items in parallel with concurrency limit
export const batchProcess = task({
id: "batch-process",
run: async (payload: { items: string[] }) => {
const results = await processVideo.batchTriggerAndWait(
payload.items.map(url => ({ payload: { videoUrl: url, userId: "system" } })),
);
return results;
},
});
```
## Installation
```bash
npm install @trigger.dev/sdk
npx trigger.dev@latest init
npx trigger.dev@latest dev # Local dev server
```
## Best Practices
1. **Long-running** — Tasks can run for minutes/hours; not limited to serverless timeouts
2. **Automatic retries** — Configure retry with exponential backoff; handles transient failures
3. **Concurrency** — Set `concurrencyLimit` to control parallel execution; prevent overwhelming APIs
4. **Fan-out** — Use `batchTriggerAndWait` to process arrays in parallel; collect all results
5. **Idempotent** — Design tasks to be safely re-runnable; retries may re-execute partially completed tasks
6. **Real-time logs** — Dashboard shows live logs, status, duration; debug without local reproduction
7. **Scheduled tasks** — Cron expressions for periodic jobs; replaces node-cron with managed infrastructure
8. **Type-safe** — Payload types enforced; trigger and task share TypeScript typesRelated Skills
jobs-to-be-done
Analyze what customers truly need by discovering the "job" they hire your product to do. Use when the user mentions "customer discovery", "why customers churn", "what job does this solve", "competing against luck", or "product-market fit". Covers JTBD interviews, competition analysis, and jobs-oriented roadmaps. For product positioning, see obviously-awesome. For rapid validation, see design-sprint. Trigger with 'jobs', 'to', 'be'.
background-worker-creator
Background Worker Creator - Auto-activating skill for Backend Development. Triggers on: background worker creator, background worker creator Part of the Backend Development skill category.
microsoft-typescript
ALWAYS use when editing or working with *.ts, *.tsx, *.mts, *.cts files or code importing "typescript". Consult for debugging, best practices, or modifying typescript, TypeScript.
typescript-mcp-server-generator
Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration
javascript-typescript-jest
Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.
background-remover
AI Background Removal - Remove background from images, create transparent PNG, one-click background remover for e-commerce product photos, portrait headshots, design materials. Supports JPG, PNG, WebP local files and remote URLs.
typescript-pro
Master TypeScript with advanced types, generics, and strict type safety. Handles complex type systems, decorators, and enterprise-grade patterns. Use PROACTIVELY for TypeScript architecture, type inference optimization, or advanced typing patterns.
microsoft-azure-webjobs-extensions-authentication-events-dotnet
Microsoft Entra Authentication Events SDK for .NET. Azure Functions triggers for custom authentication extensions. Use for token enrichment, custom claims, attribute collection, and OTP customization in Entra ID. Triggers: "Authentication Events", "WebJobsAuthenticationEventsTrigger", "OnTokenIssuanceStart", "OnAttributeCollectionStart", "custom claims", "token enrichment", "Entra custom extension", "authentication extension".
javascript-typescript-typescript-scaffold
You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N
hugging-face-jobs
This skill should be used when users want to run any workload on Hugging Face Jobs infrastructure. Covers UV scripts, Docker-based jobs, hardware selection, cost estimation, authentication with tokens, secrets management, timeout configuration, and result persistence. Designed for general-purpose compute workloads including data processing, inference, experiments, batch jobs, and any Python-based tasks. Should be invoked for tasks involving cloud compute, GPU workloads, or when users mention running jobs on Hugging Face infrastructure without local setup.
dbos-typescript
DBOS TypeScript SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing TypeScript code with DBOS, creating workflows and steps, using queues, using DBOSClient from external applications, or building applications that need to be resilient to failures.
typescript-write
Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.