I think this will work (was easier than expected!):
In xml:
<bean id="timePolicy"
class="org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy">
<property name="routeStartTime" value="0 0 8 * * ?"/>
<property name="routeStopTime" value="0 0 22 * * ?"/>
</bean>
In route declaration:
from(routes.get(A2CMessageDefaultValues.TRANSPORT_INBOX)).routeId("A2cMessageService")
.routePolicyRef("timePolicy").beanRef("messagePreProcessor").choice()
....
--
View this message in context:
http://camel.465427.n5.nabble.com/Configure-a-camel-route-to-start-and-stop-at-certain-time-of-day-tp5771520p5771547.html
Sent from the Camel - Users mailing list archive at Nabble.com.