plainjob is a lightweight, high-performance job queue backed by SQLite, designed to handle up to 15,000 jobs per second. It supports both bun:sqlite and better-sqlite3 as database drivers, with TypeScript types included. Key differentiators include its minimal dependencies (only better-sqlite3 and a cron-parser), support for delayed jobs, cron-scheduled jobs, automatic cleanup, and job timeout handling. The current stable version is 0.0.14, with active development on GitHub.
npm install plainjobNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a SQLite-backed queue using bun:sqlite, defines a worker for 'print' jobs, enqueues a job, and starts processing.
Use `new Database('data.db', { strict: true })` when using bun.Replace `processAll(queue)` with `worker.stop()`.
Use the status string literals instead of enum.
Run `npm install plainjob better-sqlite3`.
Use `better()` with a `better-sqlite3` Database instance for Node.js, or `bun()` with `bun:sqlite` Database for Bun.
Wrap the Database instance: `const connection = bun(new Database('data.db', { strict: true }));`Create the database with `new Database('path', { strict: true })`.