Hi,
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+*+*+*+*+?$")
.to("bean:myRouteStartStopBean);
Hope this helps.
Cheers,
Ashwin...
-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com
Blog: http://opensourceknowledge.blogspot.com
---------------------------------------------------------
--
View this message in context:
http://camel.465427.n5.nabble.com/CronScheduledRoutePolicy-tp4552324p4554769.html
Sent from the Camel - Users mailing list archive at Nabble.com.