
Trigger.dev Has Free Background Jobs — Here's How to Run Long Tasks Without Timeouts
Vercel functions time out after 60 seconds. Trigger.dev runs your background jobs for hours — with retries, scheduling, and real-time logs. What is Trigger.dev? Trigger.dev is an open-source background job framework for TypeScript. Define tasks, trigger them from your app, and they run reliably on Trigger.dev's infrastructure. Free Tier 5,000 runs/month 5 concurrent runs 30 min max run duration Real-time logs Quick Start npx trigger.dev@latest init Define a Task // trigger/tasks.ts import { task } from ' @trigger.dev/sdk/v3 ' ; export const processOrder = task ({ id : ' process-order ' , maxDuration : 300 , // 5 minutes retry : { maxAttempts : 3 }, run : async ( payload : { orderId : string ; userId : string }) => { // Step 1: Validate order const order = await db . orders . findUnique ({ where : { id : payload . orderId } }); if ( ! order ) throw new Error ( ' Order not found ' ); // Step 2: Charge payment (this can take time) const charge = await stripe . charges . create ({ amount :
Continue reading on Dev.to Webdev
Opens in a new tab



