Hi I'm new to Apache Camel , trying to write one route to move files from one
location to other, I want to move the files only once for every five
minutes. If I move the files once again I need to wait for 5 minutes again
to move here is the code that I wrote:

public static void main(final String[] arguments) {
                final CamelContext camelContext = new DefaultCamelContext();
                try {
                        camelContext.addRoutes(new RouteBuilder() {
                                @Override
                                public void configure() throws Exception {
                                        
                                        CronScheduledRoutePolicy policy= new 
CronScheduledRoutePolicy();
                                        policy.setRouteStartTime("* */5 * * * 
?");
                                        
                                        from("file:C:\\camel\\input")
                                            
.routeId("testRoute").routePolicy(policy)
                                            .to("file:C:\\camel\\output");
                                        
                                }
                        });
                        camelContext.start();
                        Thread.sleep(50000);
                        
                } catch (Exception camelException) {
                }

but when I execute the code, it is moving the files for every 3 seconds,
trying to understand how it works, tried lot of options and fed up with
this, Can some one please help me, My requirement is it should move the
files once and wait for 5 minutes and them move again. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Job-not-running-properly-tp5791816.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to