Spring Cloud Dataflow schedule to task execution relationship

1/25/2022

Prerequisites: Spring Cloud Dataflow version 2.8.2 running under Kubernetes.

I am creating schedules programmatically in SCDF using the org.springframework.cloud.dataflow.rest.client.dsl (the same issue goes for manual creation as well).

This creates a cronjob in kubernetes, which is not stored in any SCDF database table (such as app_registration, task_definitions, etc. tables). These cronjobs then execute tasks.

Is there any way for me to determine, which task was executed from which schedule ?

I would like to receive it in form of environment variable such as SCDF gives you the SPRING_DATASOURCE properties.

I could add schedule name manually in schedule definition, but I would have to do that for every task in the composed task (app.task1.property1, app.task2.property1), because the wildcard properties (app.*.property1) do not work for some reason.

-- Tomas Lukac
environment
kubernetes
schedule
spring-cloud-dataflow

0 Answers