In Quartz the first parameter is seconds.
To execute every 5 min cron-style use this cron expression (works for me):
cron=0+0/5+*+*+*+?

Brgds, Magnus Palmér

2011/8/1 dattu.1729 <[email protected]>

> 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.
>

Reply via email to