Hi You may want to try the simple trigger instead of cron based, to indicate a 5 minute gap between tasks.
Or use the timer component instead? http://camel.apache.org/timer And use the fixedRate=true option. On Mon, Aug 1, 2011 at 4:49 PM, dattu.1729 <dattu.1...@gmail.com> wrote: > Hi, > > I am using camel->quartz component. My use case is "Have to merge all > avaliable files for every 5 mins." In this example, I don't want to run > parallel thread. > > final FileEndpoint enpoint = (FileEndpoint)endpoint("file:src/ip/ch1"); > final RouteBuilder route = new Filecopy("mergeRoute",enpoint); > context.addRoutes(route); > from("quartz://myTimer/myTimerName?cron=5+*+*+*+*+?&stateful=true") > .process(new Processor() { > > > @Override > public void process(Exchange exchange) > throws Exception { > File[] files = > enpoint.getFile().listFiles(); > if(files != null && > files.length > 0){ > > context.startRoute("mergeRoute"); > } else { > > System.out.println("--No Files--"); > } > } > > }); > > Filecopy class is another Route, which will do file merge and oncompletion > will stop Route. > > If merging is taking more than 5mins, another Route is starting and merging > files parallel. To stop this parallel processing what i need to do? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/apache-came-with-quartz-no-concurrent-execution-tp4655221p4655221.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/