Spring Cloud Task

Spring Cloud Task allows a user to develop and run short lived microservices using Spring Cloud and run them locally, in the cloud, even on Spring Cloud Data Flow. Just add @EnableTask and run your app as a Spring Boot app (single application context).

Quick Start
Fork me on GitHub

Quick Start


The recommended way to get started using spring-cloud-task in your project is with a dependency management system – the snippet below can be copied and pasted into your build. Need help? See our getting started guides on building with Maven and Gradle.

As long as Spring Cloud Task is on the classpath any Spring Boot application with @EnableTask will record the start and finish of the boot application as well as any uncaught exceptions in the configured task repository. Sample application:

public class ExampleApplication {

    public CommandLineRunner commandLineRunner() {
        return strings ->
                System.out.println("Executed at :" + 
                      new SimpleDateFormat().format(new Date()));

    public static void main(String[] args) {
        SpringApplication.run(ExampleApplication.class, args);