API Reference
pg-boss
PostgreSQL-backed job queue for Node.js with retries, delayed scheduling, and transactional enqueue.
Official Documentation ↗CompatibilityThis documentation covers version
v12.38.0. Check the official docs for the latest API surface.Installation
npm
npm install pg-bossMethods
No methods match this filter.
pg-boss stores jobs as rows in PostgreSQL, using the database as the single source of truth for delivery.
Key Features
- At-least-once delivery with retries
- Delayed and cron scheduling
- Enqueue inside your own transaction
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
Security notes
Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://cdn.jsdelivr.net/gh/timgit/pg-boss@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:51:40.663Z.
- It is maintained by one person, and sponsorship is what pays for the maintenance, security response, and support behind it. (https://cdn.jsdelivr.net/gh/timgit/pg-boss@latest/README.md)
FAQ
- Why use pg-boss instead of a separate broker?
- If you already run PostgreSQL, pg-boss avoids operating another service while giving you transactional enqueue in the same database.
- What happens if a worker crashes mid-job?
- The job remains active until its expiration lapses, then becomes available again, so handlers should be idempotent under at-least-once delivery.
- How do I schedule recurring work?
- Use boss.schedule(queue, cron, data) with a cron expression so pg-boss enqueues jobs on that cadence.
Report a problem with this API docOpens a pre-filled issue on GitHub.