Spring Cloud Task 2.0.0.RELEASE is now available

Releases | Michael Minella | May 07, 2018 | ...

We are pleased to announce that Spring Cloud Task 2.0.0.RELEASE is now available on Github and the Pivotal download repository. Many thanks to all of those who contributed to this release.

What's New?

Spring Cloud Task 2.0.0.RELEASE is intended to be the version of the framework aligned with Spring Boot 2. Updates from 1.2.x include:

  • Updates to all dependencies.
  • Restricting concurrent task execution.
  • A failed batch job execution fails a task.

Let's walk through these updates in more detail.

Update to All Dependencies

As stated earlier, this is the generally available release that brings Spring Cloud Task into alignment with Spring Boot 2. This includes updating all dependencies as well as updating the minimum version of java to JDK 8+.

Restricting Concurrent Task Execution

Spring Cloud Task is intended to be used to execute finite workloads in a cloud environment. Many workloads that fall into that category need to be executed serially. Preventing multiple instances of a given task from executing provides important value. This release adds the ability to prevent multiple instances of a given task from being executed at the same time. This functionality is built on the distributed locking mechanisms built into Spring Integration. Once the required dependencies from Spring Integration (spring-integration-core and spring-integration-jdbc, to be specific) are included, you can configure a single property on your task (spring.cloud.task.singleInstanceEnabled=true) to prevent multiple instances from executing. If this property is set to true (it is false by default), a second attempt at executing the task while the first is running causes the second task execution to fail, indicating that the task is already running.

More information on this feature can be found in the documentation here.

A Failed Batch Job Execution Fails a Task

By default, the mechanisms that run Spring Batch jobs within Spring Boot log any job failures and happily continue along. However, that means that a task running a Spring Batch job always completes successfully. This release enables the ability for a Spring Batch job that fails to cause the task that enclosed it to fail. Like all things Spring, we make this hard to consume.... Just set the property spring.cloud.task.batch.failOnJobFailure=true (false is the default). With that property set, if a job is run within the configured task and fails, the task results in a failure (indicated via an exit code of 1).

More information on this feature can be found in the documentation here.

What Do You Think?

We look forward to your feedback on these new features in Github, StackOverflow, Gitter, or directly via Twitter @michaelminella!

Spring Cloud Task Home | Source on GitHub | Reference Documentation

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all