diff --git a/README.md b/README.md index fc87d69..86b8a8e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ import cron4s.Cron import eu.timepit.fs2cron.cron4s.Cron4sScheduler val cronScheduler = Cron4sScheduler.systemDefault[IO] -// cronScheduler: eu.timepit.fs2cron.Scheduler[IO, cron4s.expr.CronExpr] = eu.timepit.fs2cron.cron4s.Cron4sScheduler$$anon$1@3b612fa5 +// cronScheduler: eu.timepit.fs2cron.Scheduler[IO, cron4s.expr.CronExpr] = eu.timepit.fs2cron.cron4s.Cron4sScheduler$$anon$1@625bb073 val evenSeconds = Cron.unsafeParse("*/2 * * ? * *") // evenSeconds: cron4s.package.CronExpr = CronExpr( @@ -48,9 +48,9 @@ val scheduled = cronScheduler.awakeEvery(evenSeconds) >> printTime // scheduled: Stream[[x]IO[x], Unit] = Stream(..) scheduled.take(3).compile.drain.unsafeRunSync() -// 22:34:46.145109392 -// 22:34:48.001058522 -// 22:34:50.001971813 +// 12:38:40.031512447 +// 12:38:42.001027177 +// 12:38:44.000518647 ``` ```scala val everyFiveSeconds = Cron.unsafeParse("*/5 * * ? * *") @@ -70,15 +70,15 @@ val scheduledTasks = cronScheduler.schedule(List( // scheduledTasks: Stream[IO, Unit] = Stream(..) scheduledTasks.take(9).compile.drain.unsafeRunSync() -// 22:34:52.001721651 task 1 -// 22:34:54.001702294 task 1 -// 22:34:55.002032079 task 2 -// 22:34:56.000919733 task 1 -// 22:34:58.000939089 task 1 -// 22:35:00.001158852 task 1 -// 22:35:00.001743567 task 2 -// 22:35:02.001037743 task 1 -// 22:35:04.001006980 task 1 +// 12:38:45.001594555 task 2 +// 12:38:46.000972112 task 1 +// 12:38:48.001605611 task 1 +// 12:38:50.000343600 task 2 +// 12:38:50.000664246 task 1 +// 12:38:52.000439584 task 1 +// 12:38:54.000618682 task 1 +// 12:38:55.000250687 task 2 +// 12:38:56.000902626 task 1 ``` #### Cancelling the scheduled task @@ -122,7 +122,7 @@ import com.github.eikek.calev.CalEvent import eu.timepit.fs2cron.calev.CalevScheduler val calevScheduler = CalevScheduler.systemDefault[IO] -// calevScheduler: eu.timepit.fs2cron.Scheduler[IO, CalEvent] = eu.timepit.fs2cron.calev.CalevScheduler$$anon$1@5b72ab85 +// calevScheduler: eu.timepit.fs2cron.Scheduler[IO, CalEvent] = eu.timepit.fs2cron.calev.CalevScheduler$$anon$1@6ed71de5 val oddSeconds = CalEvent.unsafe("*-*-* *:*:1/2") // oddSeconds: CalEvent = CalEvent( // weekday = All, @@ -138,9 +138,9 @@ val oddSeconds = CalEvent.unsafe("*-*-* *:*:1/2") val calevScheduled = calevScheduler.awakeEvery(oddSeconds) >> printTime // calevScheduled: Stream[[x]IO[x], Unit] = Stream(..) calevScheduled.take(3).compile.drain.unsafeRunSync() -// 22:35:05.005121709 -// 22:35:07.000442205 -// 22:35:09.000989961 +// 12:38:57.006764100 +// 12:38:59.000609396 +// 12:39:01.000623646 ``` ```scala @@ -163,15 +163,15 @@ val calevScheduledTasks = calevScheduler.schedule(List( // calevScheduledTasks: Stream[IO, Unit] = Stream(..) calevScheduledTasks.take(9).compile.drain.unsafeRunSync() -// 22:35:11.000475346 task 1 -// 22:35:12.000865309 task 2 -// 22:35:13.000723319 task 1 -// 22:35:15.001042916 task 1 -// 22:35:16.000423061 task 2 -// 22:35:17.000806045 task 1 -// 22:35:19.000158236 task 1 -// 22:35:20.000879932 task 2 -// 22:35:21.000786710 task 1 +// 12:39:02.999975951 task 1 +// 12:39:03.999878983 task 2 +// 12:39:05.000458555 task 1 +// 12:39:07.000196942 task 1 +// 12:39:08.000452908 task 2 +// 12:39:08.999946252 task 1 +// 12:39:11.000792975 task 1 +// 12:39:12.000086810 task 2 +// 12:39:13.000453110 task 1 ``` ## Using fs2-cron @@ -181,8 +181,8 @@ The latest version of the library is available for Scala 2.12 and 2.13. If you're using sbt, add the following to your build: ```sbt libraryDependencies ++= Seq( - "eu.timepit" %% "fs2-cron-cron4s" % "0.9.0" //and/or - "eu.timepit" %% "fs2-cron-calev" % "0.9.0" + "eu.timepit" %% "fs2-cron-cron4s" % "0.10.0" //and/or + "eu.timepit" %% "fs2-cron-calev" % "0.10.0" ) ```