Skip to content

Releases: JakeWharton/cardiologist

0.8.0

Choose a tag to compare

@kevincianfarini kevincianfarini released this 28 Aug 17:49

Added

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

Full Changelog: 0.7.0...0.8.0

0.7.0

Choose a tag to compare

@kevincianfarini kevincianfarini released this 01 Aug 02:59

Fixed

  • Multiple scheduling bugs have been found and fixed after adopting part of apscheduler's test suite. (#155)

Removed

  • PulseSchedule has removed its Set properties in favor of sorted List properties. This helps speed up finding the next scheduled occurrence of a Pulse. (#156)

Full Changelog: 0.6.1...0.7.0

0.6.1

Choose a tag to compare

@kevincianfarini kevincianfarini released this 25 Jul 20:27

What's Changed

Fixed

Dependencies

  • Updated to kotlinx-datetime 0.7.1

Full Changelog: 0.6.0...0.6.1

0.6.0

Choose a tag to compare

@kevincianfarini kevincianfarini released this 27 Jun 15:26
ac7b27e

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.fixedPeriodPulse has been removed. Use kotlin.time.Clock.fixedPeriodPulse.
  • kotlinx.datetime.Clock.schedulePulse has been removed. Use kotlin.time.Clock.schedulePulse.
  • kotlinx.datetime.Clock.executeAt has been removed. Use kotlin.time.Clock.executeAt.

Full Changelog

0.5.0...0.6.0

0.5.0

Choose a tag to compare

@kevincianfarini kevincianfarini released this 05 Jun 16:38

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:

  1. Minutes, hours, days of month, months, and days of week fields
  2. Lists of values like 1,2,3 * * * *
  3. Ranges of values like * * * * 1-5

and do not include any extensions like:

  1. Special directives like @monthly or @reboot
  2. Randomized ranges like 1~5
  3. Step ranges like */2
  4. 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...0.5.0

0.4.0

Choose a tag to compare

@kevincianfarini kevincianfarini released this 04 May 19:22
4221972

Added

  • RecurringJobMode.Skip now allows you to skip pulse beats when a previous job has not yet completed. (#88)
  • Fixed period Pulses are now named Clock.fixedPeriodPulse. (#87)
  • wasmWasi support. (#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.intervalPulse is not longer available. Use Clock.fixedPeriodPulse. (#87)

Full Changelog: 0.3.1...0.4.0

0.3.1

Choose a tag to compare

@kevincianfarini kevincianfarini released this 07 Jan 18:24

What's Changed

New Contributors

Full Changelog: 0.3.0...0.3.1

0.3.0

Choose a tag to compare

@kevincianfarini kevincianfarini released this 05 Sep 19:01
63f9e54

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

Choose a tag to compare

@kevincianfarini kevincianfarini released this 15 Feb 18:08
25083c5

What's Changed

Full Changelog: 0.2.1...0.2.2

0.2.1

Choose a tag to compare

@kevincianfarini kevincianfarini released this 19 Jan 20:15

What's Changed

  • Fix LocalDateTime#nextMatch bug #27

Full Changelog: 0.2.0...0.2.1