Threadmill vs Quartz

Quartz has scheduled Java jobs since 2001. Threadmill covers the same ground, durable cron and interval schedules on a cluster, and adds background jobs, retries, a dashboard and typed payloads.

Checked on . Sources: Quartz documentation, Quartz source repository.

Short version

  • Choose Threadmill if you are modernising a Quartz setup and also need fire-and-forget jobs, retries and visibility.
  • Stay with Quartz if you depend on business calendars and holiday exclusions, trigger vetoes, or a database Threadmill does not support.

Checked on . Sources: Quartz documentation, Quartz source repository.

Comparison

QuartzThreadmill
ClusteringOpt-in, coordinated through a locks tableBuilt in; every node works against the store directly
Defining workJobDetail and Trigger objects, registered in code@Job and @Recurring beans, discovered at startup
Job dataUntyped JobDataMapTyped payload record
Background jobs and retriesBuild it yourselfBuilt in, with per-job and per-exception policies
Missed firingsMisfire instructions per triggerDROP or CATCH_UP per task
PausingStandby on one nodePause a queue across the cluster
Per-key concurrencyPer job classExclusive or shared, per key
Long-running jobsNo progress channelCheck-ins and a no-progress timeout
ThreadsPlatform thread poolVirtual threads
DashboardNoneIncluded
MetricsJMXMicrometer and OpenTelemetry

Checked on . Sources: Quartz documentation, Quartz source repository.

What Quartz has that Threadmill does not

  • Calendar exclusions for weekends, holidays and business hours
  • Trigger listeners that can veto a firing
  • A long list of misfire instructions; Threadmill offers two policies
  • Support for many more JDBC databases

Migrating

Each Job class becomes a JobHandler. The keys in its JobDataMap become fields of a payload record. Triggers become @Recurring annotations or defineCronTask calls.

Checked on . Sources: Quartz documentation, Quartz source repository.