timgit/pg-boss

Job queue on Postgres for Node.js

What

Job queue for Node.js stored in Postgres (uses SKIP LOCKED), with retries, scheduling, cron and priorities. No Redis needed.

How to use

bash
npm install pg-boss
javascript
import { PgBoss } from 'pg-boss'

const boss = new PgBoss('postgres://user:pass@host/database')
await boss.start()
await boss.createQueue('emails')
await boss.send('emails', { to: 'a@b.com' })
await boss.work('emails', async ([job]) => console.log(job.data))

Reach for it when

you already have Postgres and want background jobs without adding Redis.