spring-cloud-dataflow是否提供对定义为任务的应用程序进行调度的支持? [英] Does spring-cloud-dataflow provide support for scheduling applications defined as tasks?

查看:110
本文介绍了spring-cloud-dataflow是否提供对定义为任务的应用程序进行调度的支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究使用在spring-cloud-dataflow中使用spring-cloud-task构建的项目.查看示例项目和文档后,似乎表明任务是通过仪表板或外壳手动启动的. spring-cloud-dataflow是否提供任何计划任务定义的方式,以便它们可以按cron计划运行? IE.您是否可以创建一个本身不了解计划的spring-cloud-task应用程序,但是将其部署到数据流服务器并在那里配置计划?

I have been looking at using projects built using spring-cloud-task within spring-cloud-dataflow. Having looked at the example projects and the documentation, the indication seems to be that tasks are launched manually through the dashboard or the shell. Does spring-cloud-dataflow provide any way of scheduling task definitions so that they can run for example on a cron schedule? I.e. Can you create a spring-cloud-task app which itself has no knowledge of a schedule, but deploy it to the dataflow server and configure the scheduling there?

在我查看过的帖子和博客中,我注意到以下内容:

Among the posts and blogs I have looked at I noticed the following:

https://spring.io/blog/2016/01/27/introductioning spring-cloud-task

随后的一些Q& A暗示了这种可能性,并参考了触发器,但是我认为这是在发布之前进行了讨论.

Some of the Q&A afterwards hints at this being a possibility, with the reference to triggers, but I think this was discussed before it was released.

任何建议将不胜感激,非常感谢.

Any advice would be greatly appreciated, many thanks.

推荐答案

在Spring Cloud Data Flow中启动任务的方法很少.以下是今天可用的选项.

There are few ways you could launch Tasks in Spring Cloud Data Flow. Following are the available options today.

  • Launch it using TriggerTask; with this you could either choose to launch it with fixedDelay or via a cron expression - example here.
  • Launch it via an event in streaming pipeline. Imagine a use-case where you would want to create a "thumbnail" as and when there's a new image (event) in s3-bucket or in a file-system directory; the "thumbnail" operation could be a task in this case - example here.

最后,在即将发布的版本中,我们将移植从Spring XD到Spring Cloud Data Flow的调度程序"功能.

Lastly, in the upcoming releases, we will port over "scheduler" functionality from Spring XD to Spring Cloud Data Flow.

这篇关于spring-cloud-dataflow是否提供对定义为任务的应用程序进行调度的支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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