Designing Reliable Background Jobs with Redis/BullMQ and CronDesigning Reliable Background Jobs with Redis/BullMQ and Cron
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
For background email dispatch or a tax-credit estimation, “the cron ran” isn’t enough information.
I need to know which item ran, whether it failed, and whether retrying it will duplicate an effect.
That’s where Redis/BullMQ earns its place: per-job state, bounded concurrency, retries with backoff, and a failed-job queue I can inspect.
The worker still needs careful design. A retry must not send a second email or apply the same calculation twice. I use durable operation records and provider idempotency keys where available.
If a database write must produce a job, an outbox closes the gap between committing the record and enqueueing the work.
Cron remains useful for scheduling. The queue manages execution and recovery.
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started