im setting up some routes in ActiveMQ using the camel broker for my company
im pretty new to camel and am (again) having problems with a route.
this is my code:
<route id="FTPCOPY">
<!-- EVERYDAY AT 0800 HOURS -->
<from uri="quartz://FTP/FTP.COPY?cron=0+8+00+?+*+FRI-MON"/>
<from uri="file:/srv/data/test/destination/?include=.*2280.*&noop=true&idempotent=false"/>
<to uri="sftp://*****:******@csr-1/srv/test/"/>
<to uri="activemq:queue:ftp.ftp.copy"/>
</route>
The route works, copies the files and all that but im having problem with the timer, the copying of the files Happens instantly when the ActiveMQ service is started, and then Keeps doing it until i kill the server (Generating quite alot of Overhead on the network too) i want it to run at 0800 hours, and only once.
Any advice?
Sincerely.
You can use the scheduled route policy to setup ‘opening hours’ of your routes
http://camel.apache.org/cronscheduledroutepolicy.html
Its using the camel-quartz component for the cron expressions.