Cronflower: turn a Spring Boot app into a distributed cron cluster
@Scheduled is fine until it isn't. It runs in one JVM, so the moment you scale to two instances the job fires twice. It has no retry, no timeout, no record of what ran, and if the box reboots at 02:00 the nightly rollup just quietly doesn't happen. You end up bolting on Quartz, a database, a lock table, and a dashboard you wrote yourself. cronflower is that whole stack, open source: a…
Cronflower is an open source distributed, stateful scheduler for Spring Boot applications that addresses the limitations of the @Scheduled annotation. It provides a web console and eliminates the need for external databases, brokers, or coordinators. Cronflower consists of two roles: a scheduler and an executor. The scheduler owns the schedule, decides when each task is due, and calls out to run it.
Several schedulers can form a cluster with a leader. The executor is your application, where you declare tasks using the @Task annotation. These tasks are discovered on startup and registered with the scheduler, which then owns their schedule. Cronflower enforces reliability configurations, such as retry with back-off, per-run timeout, and misfire policies.
It also provides a web console that displays every registered task with its schedule, run count, and next fire time.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.