A "cron-as-a-service" job scheduler backed entirely by Postgres -- SKIP LOCKED leasing and advisory-lock leader election, no etcd/ZooKeeper/Consul -- twenty ways the coordination quietly breaks.
Nobody has started this yet — be first.
No published tickets in this project yet.
About this project
A distributed cron scheduler in Go, running as multiple horizontally-scaled replicas that coordinate safely through Postgres alone. Every replica runs the same binary and the same four background loops (leader elector, cron materializer, worker pool, reaper) plus an HTTP API; only the cron materializer is singleton, gated by a pg_try_advisory_lock-based leader election with automatic failover. Workers lease due work with SELECT ... FOR UPDATE SKIP LOCKED so N replicas can poll the same table concurrently without ever double-processing a row. Delivery is at-least-once, explicitly, not exactly-once -- a documented tradeoff, not an oversight -- and graceful shutdown drains in-flight executions within a bounded timeout before exiting.
Twelve tickets are bugs deliberately injected into the real production code (a migration sentinel-error check dropped, a seeding idempotency guard removed, a sign flip on a catch-up cutoff that silently disables the entire product, an inverted comparison that makes the reaper reclaim active leases instead of expired ones, a semaphore slot released in the wrong scope, a session-scoped advisory lock never explicitly unlocked); eight are enhancements that do not exist yet, each with a compile-only stub so the codebase and the verification tests build before the real implementation is written. Every ticket has a dedicated Go test that goes green when the fix is correct, and the project's own existing test suite is affected by the same injected bugs -- fixing ticket 1 first unmasks the real failures from tickets 8 and 12 in that suite.
Clone it
$git clone https://github.com/nishant1821/GolangDevTraining.gitHow to run it locally, step by step.