Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsApr 7, 2026·2 min de lectura

Trigger.dev — Background Jobs for TypeScript Apps

Open-source background job framework for TypeScript. Write long-running tasks with retries, scheduling, and observability. No infrastructure to manage. Deploy alongside your Next.js app. 10,000+ stars.

Introducción

Trigger.dev is an open-source background job framework for TypeScript that lets you write long-running tasks with retries, scheduling, and full observability with 10,000+ GitHub stars. Unlike BullMQ or Celery, you write jobs as regular TypeScript functions with zero infrastructure to manage — no Redis, no workers, no queue servers. Deploy alongside your Next.js or Node.js app. Best for TypeScript teams who need background processing without the DevOps overhead. Works with: Next.js, Remix, Express, any Node.js app. Setup time: under 5 minutes.


Why Trigger.dev

Old Way Trigger.dev
Redis + BullMQ + Worker Just TypeScript functions
Manage queue infrastructure Zero infrastructure
Custom retry logic Built-in retries and backoff
Build your own dashboard Full observability UI
Cron via OS or Lambda Built-in scheduling

Background Tasks

export const generateReport = task({
  id: "generate-report",
  run: async (payload: { month: string }) => {
    const data = await queryDatabase(payload.month);    // 30 seconds
    const pdf = await generatePDF(data);                // 2 minutes
    const url = await uploadToS3(pdf);                  // 10 seconds
    await sendEmail({ to: "team@company.com", attachment: url });
    return { url };
  },
});

Scheduling (Cron)

export const dailyCleanup = schedules.task({
  id: "daily-cleanup",
  cron: "0 2 * * *",  // 2 AM daily
  run: async () => {
    await deleteExpiredSessions();
    await cleanupTempFiles();
  },
});

Retries and Error Handling

export const processPayment = task({
  id: "process-payment",
  retry: {
    maxAttempts: 5,
    factor: 2,         // Exponential backoff
    minTimeout: 1000,  // Start at 1s
    maxTimeout: 60000, // Max 60s between retries
  },
  run: async (payload) => {
    // Automatically retries on failure
    await stripeCharge(payload);
  },
});

Observability Dashboard

Real-time dashboard showing:

  • Active, completed, failed runs
  • Execution timeline
  • Logs and errors per run
  • Retry history
  • Queue depth

Deploy Options

# Self-hosted (Docker)
docker compose up -d

# Trigger.dev Cloud (managed)
npx trigger.dev@latest deploy

Key Stats

  • 10,000+ GitHub stars
  • Zero infrastructure needed
  • Built-in retries, cron, observability
  • TypeScript-native
  • Self-hosted or cloud

FAQ

Q: What is Trigger.dev? A: An open-source background job framework for TypeScript with retries, scheduling, and observability — no Redis or queue infrastructure needed.

Q: Is Trigger.dev free? A: Open-source and free to self-host. Cloud plan has a free tier.

Q: How is it different from BullMQ? A: BullMQ requires Redis and worker management. Trigger.dev needs zero infrastructure — just TypeScript functions with a built-in dashboard.


🙏

Fuente y agradecimientos

Created by Trigger.dev. Licensed under Apache 2.0.

trigger.dev — stars 10,000+

Thanks for making background jobs as simple as writing a function.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados