camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amruta Jawlekar <>
Subject Stop polling the input folder after the scheduled route is completed
Date Mon, 27 Feb 2017 12:51:36 GMT

I am working on a project which polls to one input folder, processes it and
keeps the processed files to output folder. The input files are then moved
to Backup folder.
Now I want to keep this on scheduler twice a day at fixed time. I did that
using CronScheduledRoutePolicy. Below is the code. 
The job runs on the scheduled hour, once all files are processed if I keep
another files to same input folders it processes those too. Cannot use
routeEndTime because I am not sure how much time it will take to process all

How do I ask Camel to stop polling to input folder until the next scheduled
time. I want the route to run at 12pm noon and 6pm, and not continuously
poll the input folder. 

	<bean id="startPolicy"
	    <property name="routeStartTime" value="0 00 12,18 * * ?"/>

	<camelContext trace="true"
		<camel:route id="inputFiles" routePolicyRef="startPolicy"

I tried using Quartz but was not successful. If it is possible using Quartz
and there is any link for Quartz example with spring camel context, then
please let me know.


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

View raw message