Releases: kevincianfarini/cardiologist
0.8.0
Added
- Expose dedicated cron parsing function (#164). Thanks @JakeWharton!
Changes
Clock.schedulePulse(cronExpression: String)is deprecated. Use the dedicated cron parsing function, instead. This function will be removed in 0.9.0. (#164)- Update to Kotlin 2.2.10 (#160)
New Contributors
- @JakeWharton made their first contribution 🎉
Full Changelog: 0.7.0...0.8.0
0.7.0
Fixed
- Multiple scheduling bugs have been found and fixed after adopting part of apscheduler's test suite. (#155)
Removed
PulseSchedulehas removed itsSetproperties in favor of sortedListproperties. This helps speed up finding the next scheduled occurrence of a Pulse. (#156)
Full Changelog: 0.6.1...0.7.0
0.6.1
What's Changed
Fixed
- Set middle value matches subcomponents to zero by @kevincianfarini in #152
Dependencies
- Updated to kotlinx-datetime 0.7.1
Full Changelog: 0.6.0...0.6.1
0.6.0
Changed
Updated to kotlinx-datetime 0.7.0
kotlinx-datetime 0.7.0 removes kotlinx.datetime.Instant and kotlinx.datetime.Clock in favor of their stdlib counterparts under kotlin.time. kotlinx-datetime currently offers two artifacts: a normal 0.7.0 release and a 0.7.0-0.6.x-compat release. Cardiologist chose not to take the compatibility route and instead opted to update directly to 0.7,0 and change the name references from kotlinx.datetime.[Clock | Instant] to kotlin.time.[Clock | Instant] seeing as this library is not yet stable.
APIs depending on kotlin.time.Clock and kotlin.time.Instant are now marked as ExperimentalTime
Clock and Instant in the standard library are both marked as ExperimentalTime, so Cardiologist will remain experimental until both of those types stabilize. Once that occurs and kotlinx-datetime itself makes a 1.0.0 release, this library can stabilize as well.
Removed
kotlinx.datetime.Clock.fixedPeriodPulsehas been removed. Usekotlin.time.Clock.fixedPeriodPulse.kotlinx.datetime.Clock.schedulePulsehas been removed. Usekotlin.time.Clock.schedulePulse.kotlinx.datetime.Clock.executeAthas been removed. Usekotlin.time.Clock.executeAt.
Full Changelog
0.5.0
Added
Pulses can now be scheduled on a day of the week (#131)
clock.schedulePulse(onDayOfWeek = DayOfWeek.Monday).beat {
println("It's Monday!")
}You can now build complex representations of schedules using a type-safe DSL (#94)
clock.schedulePulse {
atMinute(0, 30)
onDaysOfWeek(DayOfWeek.Monday..DayOfWeek.Friday)
}.beat { scheduled ->
println("Scheduled at $scheduled, occurred at ${clock.now()}.")
}Pulse instances can be created from a standard Cron expression (#90)
These Cron expressions are standard. Standard Cron expressions include:
- Minutes, hours, days of month, months, and days of week fields
- Lists of values like
1,2,3 * * * * - Ranges of values like
* * * * 1-5
and do not include any extensions like:
- Special directives like
@monthlyor@reboot - Randomized ranges like
1~5 - Step ranges like
*/2 - Seconds or years fields
clock.schedulePulse("* * * * *").beat { println("Hello!") }Scheduling one-off jobs has a new API (#112)
val someInstant: Instant = // ...
clock.executeAt(someInstant) {
println("I executed at ${clock.now()}!")
}Changed
RecurringJobMode has been renamed PulseBackpressureStrategy (#107, #113, #115)
This name better reflects the intent of this type. Also, this class is no longer modeled as an enum for backwards compatibility reasons as I move towards a stable API.
Removed
Clock.delayFor and Clock.delayUntilNext have been removed (#96)
Did you use these APIs and will this cause an issue for you? File an issue and I'll reconsider including them.
Pulse.beat no longer exposes the Instant at which the invocation occurred (#122)
This was error prone in certain scenarios. If you need this information, you should instead invoke Clock.now directly in the lambda.
- clock.fixedPeriodPulse(10.seconds).beat { scheduled, occurred ->
+ clock.fixedPeriodPulse(10.seconds).beat { scheduled ->
+ val occurred = clock.now()
println("Scheduled at $scheduled, occurred at $occurred.")
}Clock.delayUntil has been removed (#112)
Use Clock.executeAt instead!
Full Changelog
0.4.0
Added
RecurringJobMode.Skipnow allows you to skip pulse beats when a previous job has not yet completed. (#88)- Fixed period Pulses are now named
Clock.fixedPeriodPulse. (#87) wasmWasisupport. (#81)
Changed
- Update Kotlin to 2.1.20 (#83)
- Update kotlinx-coroutines to v1.10.2 (#85)
- Update kotlinx-datetime to v0.6.2 (#81)
Removed
Clock.intervalPulseis not longer available. UseClock.fixedPeriodPulse. (#87)
Full Changelog: 0.3.1...0.4.0
0.3.1
What's Changed
- Update kotlin monorepo to v2.1.0 by @renovate in #66
- Update kotlinx-coroutines monorepo to v1.10.1 by @renovate in #72
- Set JVM bytecode target by @kevincianfarini in #76
New Contributors
- @KaneBuckthorpe made their first contribution in #75
Full Changelog: 0.3.0...0.3.1
0.3.0
What's Changed
- Add Apache 2 License
- Update to Kotlin 2.0.20, kotlinx-datetime 0.6.1, kotlinx-coroutines 1.8.1
- Consider time drift in long running operations #54
- Exposed both a scheduled and occurred time in
Pulse.beat#57
Full Changelog: 0.2.2...0.3.0
0.2.2
What's Changed
- Update to kotlinx-coroutines 1.8.0 by @kevincianfarini in #29
Full Changelog: 0.2.1...0.2.2