Viktor
Viktor

Reputation: 365

How to schedule a task for a particular platform

According to this recipe, it's possible to schedule a task for a particular platform through CLI. Is there a way to achieve the same through UI or REST? REST API Guide does not include these details and UI seems lacking the field.

Without this launching of the scheduled task ends with

java.lang.IllegalStateException: Task definition [ssl-upload-test] has already been deployed on platform [ssl].  Requested to deploy on platform [default].

Where are the created schedules are stored? I'm failing to spot them in the database.

Upvotes: 1

Views: 332

Answers (1)

Ilayaperumal Gopinathan
Ilayaperumal Gopinathan

Reputation: 4179

The schedules are not stored in the database instead they are obtained from the platforms in which you created the schedules.

Currently, SCDF supports scheduling on Kubernetes and Cloud Foundry.

Let's say you are using Kubernetes here. When create a schedule, it creates a cronjob for it. Any subsequent operations on the schedule is delegated to K8s and the cronjob it created for that schedule.

I am not sure which version of SCDF do you use. But, the SCDF Dashboard is updated with the platform selection support recently: https://github.com/spring-cloud/spring-cloud-dataflow-ui/issues/1433 and this is available from SCDF 2.6.0-RC1

Related to the error you got:

java.lang.IllegalStateException: Task definition [ssl-upload-test] has already been deployed on platform [ssl].  Requested to deploy on platform [default].

You can't schedule a same task to multiple platforms. This is by design. if you want to schedule this way, you need to create a new task definition for the same.

Upvotes: 2

Related Questions