Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
124 lines (90 sloc) 3.3 KB

Create custom Spring Cloud Task

Bootstrap by follow the Task development instructions and then:

  • Set the POM parent to Boot 2.2.0.M4 or newer
  • Add dependencies to enable the Spring Cloud Task functionality and to configure the jdbc dependencies for the task repository:
  • Add dependencies to configure the jdbc dependencies for the task repository:
  • Add dependencies to configure Micrometer integration:

Spring Cloud Data FLow server

Run SCDF locally using the Docker Compose docker-compose-influxdb.yml file.

To download the Spring Cloud Data Flow Server Docker Compose file, run the following command:


The Docker Compose file starts instances of the following products:

  • Spring Cloud Data Flow Server
  • Spring Cloud Skipper Server
  • MySQL
  • Apache Kafka
  • Influx DB
  • Grafana with pre-registered dashboards

Starting Docker Compose

export DATAFLOW_VERSION=2.2.0.M1
export SKIPPER_VERSION=2.1.0.M1
docker-compose -f ./docker-compose-influxdb.yml up

Register and launch the custom Task

To use it, open another console window and type the following:

docker exec -it dataflow-server java -jar shell.jar
  • Register the custom task application
dataflow:>app register --name myTask --type task --uri

  • Create two tasks: task1 and task2 using the myTask application.
dataflow:>task create --name task1 --definition "myTask"
dataflow:>task create --name task2 --definition "myTask"
  • Launch task1 and task2 couple of times
dataflow:>task launch --name task1
dataflow:>task launch --name task2

Check task execution in the SCDF UI: http://localhost:9393/dashboard/#/tasks/executions

scdf tasks


Open Grafana at http://localhost:3000 (user: admin, password: admin) and select the Task & Batch dashboard

grafana task

You can’t perform that action at this time.