Reputation: 53
I would like to include a scheduler in my camel route that will start it every day at 8. This is my route that takes a file from an ftp:
from(
"$uri?" +
"password=RAW($pass)" +
"&include=$source_file_type" +
"&passiveMode=true" +
"&delete=true"
)
.log("Connected to FTP")
I tried to put in my from this:
"&scheduler.cron=$cron_expression"
but it did not work
Upvotes: 0
Views: 1780
Reputation: 1722
Quoting the docs for scheduler
property of FTP Component.
To use a cron scheduler from either camel-spring or camel-quartz component. The value can be one of: none, spring, quartz
To use a cron style expression, you need to couple FTP with one of the two scheduler options mentioned in the docs.
For using quartz as a scheduler in Camel 3.x, try this
scheduler=quartz&scheduler.cron=<your crown expression>
to FTP route definitionIf you are using Camel 2.x,
scheduler=quartz2&scheduler.cron=<your crown expression>
to FTP route definitionUpvotes: 2