Hey folks 👋
A while ago I built node-cron, a small library to schedule recurring tasks in Node.js. It got pretty popular (5M+ downloads/month), and I'm happy to see how widely it’s been adopted.
But over time, I noticed a recurring issue: people were running it inside production APIs (like Express apps), which led to some serious problems. Running background jobs inside Express apps can cause blocking I/O and make your API unresponsive.
Also, if your app is deployed across multiple instances, each one might run the same job, unless you set up a distributed locking mechanism manually.
To solve that, we created Sidequest.js, a background job runner for Node.js focused on simplicity, isolation, and zero lock-in.
It’s inspired by Oban (Elixir) and Sidekiq (Rails), but works with infrastructure most people already have. You can use PostgreSQL, MySQL, SQLite, or MongoDB as a backend, reusing the same database your app already relies on.
Jobs run in worker threads, isolated from your app’s main process. The system supports:
- unique jobs
- retries with exponential backoff
- snoozing & priorities
- concurrency control
Here’s how it looks in code:
import { Sidequest, Job } from "sidequest";
export class EmailJob extends Job {
async run(to, subject) {
console.log(`Sending email to ${to}: ${subject}`);
}
}
// Enqueue
await Sidequest.build(EmailJob).enqueue("user@example.com", "Welcome!");
// Starting Sidequest
Sidequest.start({
backend: {
driver: "@sidequest/postgres-backend",
config: "postgres://postgres:postgres@localhost:5432/my_database"
}
});
There's also a dashboard to monitor everything:
If you’ve used BullMQ and want something that doesn’t depend solely on Redis, or if you’re tired of being locked into SQS or other cloud services — give Sidequest a try.
Just released the first stable version. I would love your feedback!
Thanks for checking it out!
Top comments (0)