You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jmh <je...@nrb.be> on 2010/11/25 23:15:58 UTC
camel-ftp and crontab
Hello,
I need to start a camel-ftp component periodicaly with a cron expression
(every friday at 10pm)
The problem is that camel-ftp does not have this option out-of-the-box (only
a delay)
So I have imagined this solution that seems to work fine !
What do camel-gurus think about ?
from("quartz://dmm?cron=" + cron).routeId("quartz").process(
new Processor() {
public void process(Exchange ex) throws Exception {
ex.getContext().startRoute("ftp");
}
});
from(
"ftp://" + username + "@" + server + "/out?password="
+ password + options)
.routeId("ftp")
.noAutoStartup()
.to("file://"
+ outDir
+ "?fileName=domymove.txt&tempFileName=${file:onlyname.noext}.tmp")
.process(new Processor() {
public void process(Exchange ex) throws Exception {
ex.getContext().stopRoute("ftp");
}
});
Regards
J-M
--
View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-and-crontab-tp3280663p3280663.html
Sent from the Camel - Users mailing list archive at Nabble.com.