pg-boss
A job queue built on PostgreSQL for Node.js applications, providing reliable background job processing with scheduling and retry capabilities.
At a Glance
Pricing
Get started with pg-boss at no cost with Full job queue functionality and PostgreSQL-based storage.
Engagement
Available On
About pg-boss
pg-boss is a robust job queue library built on PostgreSQL for Node.js applications. It leverages PostgreSQL's reliability and ACID compliance to provide durable background job processing without requiring additional infrastructure like Redis or RabbitMQ. The library is designed for developers who want to add job queuing capabilities to their applications while keeping their technology stack simple.
-
PostgreSQL-based Architecture provides durable job storage using your existing PostgreSQL database, eliminating the need for additional queue infrastructure and ensuring jobs survive application restarts.
-
Job Scheduling allows you to schedule jobs to run at specific times or intervals using cron expressions, making it easy to implement recurring tasks and delayed job execution.
-
Automatic Retries handles failed jobs with configurable retry policies, including exponential backoff, ensuring transient failures don't result in lost work.
-
Job Throttling and Rate Limiting enables control over job execution rates to prevent overwhelming downstream services or resources.
-
Dead Letter Queues automatically moves failed jobs after exhausting retries to a separate queue for manual inspection and reprocessing.
-
Job Completion Callbacks supports job chaining and workflows by allowing jobs to trigger subsequent jobs upon completion.
-
Singleton Jobs ensures only one instance of a specific job runs at a time, preventing duplicate processing.
-
Job Expiration automatically expires jobs that haven't been processed within a configurable time window.
To get started, install pg-boss via npm with npm install pg-boss, then create a new instance by passing your PostgreSQL connection string. Call the start() method to initialize the queue tables, use send() to enqueue jobs, and work() to process them. The library handles all the complexity of job locking, visibility timeouts, and state management automatically.

Community Discussions
Be the first to start a conversation about pg-boss
Share your experience with pg-boss, ask questions, or help others learn from your insights.
Pricing
Open Source
Get started with pg-boss at no cost with Full job queue functionality and PostgreSQL-based storage.
- Full job queue functionality
- PostgreSQL-based storage
- Job scheduling
- Automatic retries
- Dead letter queues
Capabilities
Key Features
- PostgreSQL-based job queue
- Job scheduling with cron expressions
- Automatic retries with configurable policies
- Job throttling and rate limiting
- Dead letter queues
- Job completion callbacks
- Singleton jobs
- Job expiration
- Delayed job execution
- Job prioritization