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.

25 stars

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

$curl -o ~/.claude/skills/trigger-dev-v3/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/trigger-dev-v3/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/trigger-dev-v3/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Trigger.dev v3 — Background Jobs for TypeScript Compares

Feature / AgentTrigger.dev v3 — Background Jobs for TypeScriptStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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 types

Related Skills

jobs-to-be-done

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration

javascript-typescript-jest

25
from ComeOnOliver/skillshub

Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.

background-remover

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

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

25
from ComeOnOliver/skillshub

Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.