On Wed, Mar 2, 2011 at 12:18 AM, saw <[email protected]> wrote:
> I'm trying to configure a route to pause/resume at certain times. The
> requirement is that the route should be active every day only between 1:00PM
> and 5:00 PM.
>
> I'm trying to use the cron scheduling options with CronScheduledRoutePolicy
> available in camel 2.6 and i've followed the tutorial at
> http://opensourceknowledge.blogspot.com/2010/09/developed-capability-in-camel-to.html
> http://opensourceknowledge.blogspot.com/2010/09/developed-capability-in-camel-to.html
> but i can't seem to be able to get it to work.
>
> Specifically i'm trying to add both routeResumeTime and routeSuspendTime to
> the same policy but this doesn't seem to work. The policy only works when
> one property is set.
>

Yeah in Camel 2.7 you can set as many your like, just separate with comma.

> Can someone give me an example of how i can go about implementing this?
>

Take a look at the source code, and then using a single policy you can
just change the state of the route.

You know it should only be active from 1-5PM, so you just need the
cron to trigger at those 2 times.
So if times is < 1pm or > 5pm then you stop it. Otherwise you start it.



> thanks
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Scheduling-routes-to-suspend-resume-tp3405863p3405863.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to