Celebration time!

I’m pleased to announce the release of JobRunr v2.0.0. It is now available for download from Maven Central.

And, on top of that, JobRunr became 1 year old - the first official release of JobRunr was in April 2020.

Breaking changes ahead!

As this is a major release, I took the chance to do some breaking changes: from now on, the lambda should always be the last argument when enqueueing or scheduling a job.

This means you will need to do the following changes:

Schedule in v1.x.x:
BackgroundJob.schedule<EmailService>(x -> x.sendNewlyRegisteredEmail(), Instant.now().plusHours(24));
Schedule in v2.x.x:
BackgroundJob.schedule<EmailService>(Instant.now().plusHours(24), x -> x.sendNewlyRegisteredEmail());
ScheduleRecurrently in v1.x.x:
BackgroundJob.scheduleRecurrently(() -> System.out.println("Easy!"), Cron.daily());
ScheduleRecurrently in v2.x.x:
BackgroundJob.scheduleRecurrently(Cron.daily(), () -> System.out.println("Easy!"));

New features

  • Kotlin support: Do you want to use JobRunr in Kotlin? Well, from release 2.0.0, JobRunr natively supports Kotlin. Scheduling background jobs is as easy as follows:
val testService = TestService()
val input = "Hello!"
val jobId = jobScheduler.enqueue { testService.doWork(input) }
  • Dashboard authentication: In release 2.0.0 there is now support for basic authentication. Do note that this is by definition insecure as your password is saved in clear text in the configuration. It does allow for some easy

  • Specify your own JobId: From release 2.0.0, you can specify your own UUID as JobID. This comes in handy when you are working in an event based architecture (or you just want to make your architecture idempotent) and allows you to specify your own Job Id. You can create a job with the same id multiple times, it will only be executed once.

All improvements & bugfixes