You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kalber <Ka...@swslt.com> on 2016/05/27 13:28:48 UTC

QuartzScheduler, reschedule running route

I start a route with scheduler=quartz2&scheduler.cron=0 03,11 * * * ? on an
ftp component.

Changing cron value on my config file an bringing up to context, how can i
change  schedule.cron
on this running route ?
Mybe context.getRouteDefinitions(), what must be replaced  ?

Or QuartzScheduler ?

Thanks
Karlheinz



-----
kh
--
View this message in context: http://camel.465427.n5.nabble.com/QuartzScheduler-reschedule-running-route-tp5783159.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: QuartzScheduler, reschedule running route

Posted by kalber <Ka...@swslt.com>.
It's simple, 

remove route , replace fromDefintion  & add reoute:

  RouteDefinition d = context.getRouteDefinition(routeId);
  context.removeRouteDefinition(d);

  List<FromDefinition> inputs = d.getInputs();
  for (FromDefinition fromDefinition : inputs)

    fromDefinition.setUri(uri.replace(oldScheduler, newScheduler));


 context.addRoutes(r);



-----
kh
--
View this message in context: http://camel.465427.n5.nabble.com/QuartzScheduler-reschedule-running-route-tp5783159p5783384.html
Sent from the Camel - Users mailing list archive at Nabble.com.