chronos-go is a Redis-backed distributed task queue and scheduler for Go — type-safe tasks, a scheduler that elects a single leader, crash recovery, and Chains & Groups.
chronos-go runs in every pod — only the leader (★) enqueues each trigger once; standby pods take over on failure.
Features
A modern alternative to asynq — type-safe, distributed, and reliable.
Define a task type, register a Handler[T] — no interface{} payloads, no manual unmarshal.
Interval & cron jobs. A Redis leader election ensures only one instance enqueues each trigger.
Exponential backoff + jitter, crash recovery via XAUTOCLAIM, dead-letter with a hook.
Sequential chains and parallel groups, with results relayed between steps.
Hash-tagged keys keep each queue on one slot, so multi-key Lua stays atomic.
Metrics, an Inspector API, and a chronos CLI for queues and tasks.
Why chronos-go
asynq is in maintenance mode. chronos-go keeps the simple model and fixes the gaps.
| asynq | chronos-go | |
|---|---|---|
| Distributed scheduler (run-once) | ✗ | ✓ |
| Generic type-safe tasks | ✗ | ✓ |
| Bounded stream / dead-letter growth | — | ✓ |
| Unique lock renewed during long processing | ✗ | ✓ |
| Actively maintained | maintenance | ✓ |
How it works
Immediate work rides a Redis Stream; delayed, retry and archived tasks live in sorted sets. A forwarder promotes due entries; a recoverer reclaims tasks from crashed workers.
Read the docs and add reliable background jobs to your Go service.