Does spring-cloud-dataflow provide support for scheduling applications defined as tasks?

霸气de小男生 提交于 2020-02-20 06:10:12

问题


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/introducing-spring-cloud-task

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.


回答1:


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.

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



来源:https://stackoverflow.com/questions/38991956/does-spring-cloud-dataflow-provide-support-for-scheduling-applications-defined-a

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