Rezvan Chagaev
Rezvan Chagaev

Reputation: 590

Camel FTP Scheduled polling

I am looking for a solution how to poll ftp at the specified time (every month for example)

I've tried to do this in the following way:

  <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
    <property name="routeStartTime" value="* * * L * ?"/>
  </bean>

  <route id="id" routePolicyRef="startPolicy" autoStartup="false">
    <from uri="ftp://example.com" />
    <to uri="bean:..." />
  </route>

But, when the startPolicy is triggered, ftp continues polling every 15 sec., this delay depends on consumer.delay property.

Example above will start route at the last day of month but ftp will poll every 15 seconds.

So, how to define ftp endpoint which will poll once at the specified time.

Thanks.

Upvotes: 2

Views: 1762

Answers (1)

Rezvan Chagaev
Rezvan Chagaev

Reputation: 590

Looks like quartz2 solves this problem: ...?scheduler=quartz2&scheduler.cron=++++*+?

Upvotes: 2

Related Questions