pg-boss

Job queue for Node.js that uses PostgreSQL as the backing store. pg-boss leverages PostgreSQL's SKIP LOCKED for efficient job dequeuing and uses the same database as your application — no separate Redis infrastructure required. Supports job scheduling, delayed jobs, recurring jobs (cron), job completion callbacks, retry with exponential backoff, and concurrency control. Ideal for applications already using PostgreSQL.

Evaluated Mar 06, 2026 (0d ago) v9+
Homepage ↗ Repo ↗ Developer Tools job-queue postgresql background-jobs worker scheduling node
⚙ Agent Friendliness
63
/ 100
Can an agent use this?
🔒 Security
85
/ 100
Is it safe for agents?
⚡ Reliability
81
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
80
Auth Simplicity
88
Rate Limits
85

🔒 Security

TLS Enforcement
90
Auth Strength
85
Scope Granularity
82
Dep. Hygiene
85
Secret Handling
85

PostgreSQL TLS support. Job data stored in database — apply column-level encryption for sensitive job payloads. Database credentials in connection string.

⚡ Reliability

Uptime/SLA
85
Version Stability
80
Breaking Changes
75
Error Recovery
85
AF Security Reliability

Best When

You're using PostgreSQL and want reliable background job processing without Redis — pg-boss turns your existing DB into a job queue with proper transactional semantics.

Avoid When

You need extreme job throughput, multi-database support, or sub-second job processing latency — BullMQ with Redis is faster.

Use Cases

  • Implement background job queues in agent backends that already use PostgreSQL without adding Redis infrastructure
  • Schedule one-time and recurring agent tasks using the same PostgreSQL database as application data
  • Process agent work items with reliable delivery guarantees — pg-boss uses SKIP LOCKED for exactly-once processing across workers
  • Implement delayed job execution for agent workflows that need to fire actions after a time delay
  • Build fan-out patterns where agent jobs spawn multiple child jobs tracked in the same database

Not For

  • High-volume job processing (millions of jobs/second) — BullMQ with Redis is faster for extreme throughput
  • Non-PostgreSQL databases — pg-boss is PostgreSQL only
  • Real-time job processing with sub-second latency — pg-boss polling has configurable but minimum latency overhead

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: username_password
OAuth: No Scopes: No

PostgreSQL connection string auth — same as your existing database connection. pg-boss creates its own schema in the specified database.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT-licensed open source library. Uses your existing PostgreSQL costs.

Agent Metadata

Pagination
cursor
Idempotent
Full
Retry Guidance
Documented

Known Gotchas

  • pg-boss creates tables in the 'pgboss' schema — ensure the database role has CREATE SCHEMA permissions; first start fails without schema creation rights
  • Job workers must call work() which starts polling — jobs sent before calling work() are queued in the database but not processed until workers start
  • Maintenance (archiving old jobs) runs on a schedule — configure maintenanceIntervalSeconds; databases with many jobs may have maintenance overhead
  • pg-boss v9 changed job batching API — batch sends use sendBatch() instead of multiple send() calls; older code patterns may not batch efficiently
  • Connection pooling — pg-boss uses its own internal pool; don't share your application's pg Pool with pg-boss to avoid connection exhaustion
  • Cron scheduling uses pg-boss's internal format, not standard 5-field cron — verify expression format in documentation for the version you're using

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for pg-boss.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered