Hi folks. I want to share my latest update to
Cardiologist — 0.5.0. This release is nearly feature complete before a 1.0.0. At this point I’m pretty much just waiting for kotlinx-datetime to get to 1.0.0 before I can 😄
Cardiologist lets you build job schedules with kotlinx-coroutines and kotlinx-datetime. This release features:
• Day-of-week scheduling and fully mimicking cron’s behavior with day of week and day of month scheduling.
• Backpressure handling (eg. execute slow jobs concurrently, skip new jobs when an old job is still running, or cancel the previous job when a new one is supposed to start).
• A type-safe DSL for creating complex job schedules:
clock.schedulePulse {
atSeconds(0)
atMinutes(0, 10, 20, 30, 40, 50)
inMonths(Month.May, Month.December)
onDaysOfWeek(DayOfWeek.Friday)
}
• A new API for scheduling one-off jobs.
val instant = Instant.parse("2025-05-10T13:15:00Z")
clock.executeAt(instant) {
println("I executed at ${clock.now()}!")
}
• The ability to schedule jobs with standard cron expressions:
clock.schedulePulse(cronExpression = "* * * * *")
• Improved documentation which I put a lot of effort into
• Some bug fixes