如何使用Rest-API执行Spring Cloud Task [英] How to execute spring cloud task using rest-api

查看:223
本文介绍了如何使用Rest-API执行Spring Cloud Task的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以调度云任务,也可以使用要执行的流对其进行配置. 作为开发人员,我想使用rest-api执行我的spring cloud任务,以便我可以按需执行任务. 基本上我有一个工作流程管理系统,我们正在使用Control-M代理.因此,现在一些作业将由control-m执行,而某些任务将部署在Spring Cloud Dataflow服务器上.现在,当一项作业完成时,则必须执行云上存在的另一项作业. 因此,为此,我需要具有调用rest api并按需执行云任务的功能. 我确定必须具有此功能,但是找不到文档示例. 有人可以帮帮我吗. 预先感谢.

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.

推荐答案

请参考REST-API

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

创建:

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

启动:

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

ps:列出了所有受支持的REST-API供您参考,可以在以下位置访问它们: http://localhost: 9393

这篇关于如何使用Rest-API执行Spring Cloud Task的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆