camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <>
Subject Re: CronScheduledRoutePolicy
Date Tue, 05 Jul 2011 21:06:06 GMT

I understand your requirement, however the CronScheduledRoutePolicy is
designed to fire in the following way.

    - It fires at 10 am. It can then start a route if it has not been
started or else do nothing
    - It then fires again at 4 pm. It can then stop a route if it has not
already been stopped.

Since it is a "Cron" event, the policy is not designed to poll or inspect
system time periodically to figure out whether is between 10 am and 4 p.m to
do the needful. This model is expensive in general and can limit performance
due to constant checking/polling on what needs to happen based on what time
it is. 

If this is something you absolutely need then I would recommend doing
something like what I have done below. This should fire an event every 5
seconds and your RouteStartStopBean should wake up and do the starting and
stopping of the routes you care about based on the system time. 

        from ("quartz://myGroup/myTimerName?cron=0/5+*+*+*+*+?$")

Hope this helps.



Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary) 

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message