How to execute spring cloud task using rest-api

非 Y 不嫁゛ 提交于 2020-01-24 19:29:25

问题


I know a cloud task can be scheduled and can be configured using stream also to be executed. As a developer I want to execute my spring cloud task using rest-api so that I can execute the task on demand. Basically i have a work flow management system and we are using control-m agent. So now some of the jobs will be executed by control-m and some of the task will be deployed on spring cloud dataflow server. Now when one job completes then other job which is there on cloud has to be executed. So for this I need the capability to call a rest api and execute the cloud task on demand. I am sure this feature must be there but I am unable to find an example of documentation. Can someone please help me. Thanks in advance.


回答1:


Please refer to the REST-API guide; specifically, you'd be using tasks/deployments endpoint to operate on an existing task.

Create:

dataflow:>task create foo --definition "timestamp"
Created new task 'foo'

Launch:

curl http://localhost:9393/tasks/deployments/foo\?arguments\=\&properties\= -d ""

p.s: all the supported REST-APIs are listed for your reference and they are accessible at: http://localhost:9393



来源:https://stackoverflow.com/questions/39518538/how-to-execute-spring-cloud-task-using-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!