apache-camel - 每个星期二早上 8 点轮询文件目录 :00 using apache camel

标签 apache-camel

我正忙于一个 apache camel 项目,该项目在每周二 8:00 自动执行将文件上传到 SFTP 服务器的过程。

我想将我的 apache Camel 路线的延迟设置为:每个星期二的 8:00。

我该怎么做呢?

假设“A”是我的上车地点,“B”是我的目的地。

最佳答案

使用 Quartz组件作为调度程序,pollEnrich用于读取文件,以及 FTP发送内容的组件:

from("quartz://myscheduler?cron=0+0+8+?+*+THU")
    .pollEnrich("file:inbox?fileName=data.txt")
    .to("ftp://foo@127.0.0.1:21/?password=pwd")

可以找到有关 cron 表达式的更多信息 here .

关于apache-camel - 每个星期二早上 8 点轮询文件目录 :00 using apache camel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24285967/

相关文章:

java - Camel AmbiguousMethodCallException 抽象类

java - ESB 应该如何打包/部署?

apache-camel - 暂停和恢复 Camel 路线

java - ActiveMQ:队列(具有并发消费者)和主题的正确配置

apache-camel - Camel - 当消费目录不存在时停止路由

java - Camel 属性-占位符 : Not able to configure `camel:sslContextParameters` with nested properties

java - Apache Camel : Preventing out of space while writing files

java - Camel AggregationStrategy 行为异常

rest - 使用 Apache Camel 的微服务

java - 如何在 Camel route 使用java boolean 条件?