Did you try to stop the route after polling was done? How does your route code look like?
On Mon, Feb 27, 2017 at 1:51 PM, Amruta Jawlekar [via Camel] < [email protected]> wrote: > Hi, > > 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 files. > > 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" class="org.apache.camel.routepolicy.quartz. > CronScheduledRoutePolicy"> > <property name="routeStartTime" value="0 00 12,18 * * ?"/> > </bean> > > <camelContext trace="true" > xmlns="http://camel.apache.org/schema/spring"> > <camel:route id="inputFiles" routePolicyRef="startPolicy" > autoStartup="false"> > .......... > </camelContext> > > 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. > > Thanks, > Amruta > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://camel.465427.n5.nabble.com/Stop-polling-the-input- > folder-after-the-scheduled-route-is-completed-tp5794516.html > To start a new topic under Camel - Users, email > [email protected] > To unsubscribe from Camel - Users, click here > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=> > . > NAML > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://camel.465427.n5.nabble.com/Stop-polling-the-input-folder-after-the-scheduled-route-is-completed-tp5794516p5794517.html Sent from the Camel - Users mailing list archive at Nabble.com.
