You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gert Villemos <gv...@yahoo.de> on 2011/08/22 11:38:43 UTC

Scheduling the file component to only process at specific intervals

I'm using an omnipotent file component to read through a potentially very
large directory structure (days of processing).

To limit the load of the system and not interfere with existing systems, I
would like to limit the time that the file component runs, for example to be
from 22.00 until 06.00 the next day, and then kickoff again where it left
later.

A simple solution would be to have a second route with a scheduler that
simply stops the file route and then starts it again later. 

Is there any even simpler way?

--
View this message in context: http://camel.465427.n5.nabble.com/Scheduling-the-file-component-to-only-process-at-specific-intervals-tp4722758p4722758.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Scheduling the file component to only process at specific intervals

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Aug 22, 2011 at 11:38 AM, Gert Villemos <gv...@yahoo.de> wrote:
> I'm using an omnipotent file component to read through a potentially very
> large directory structure (days of processing).
>
> To limit the load of the system and not interfere with existing systems, I
> would like to limit the time that the file component runs, for example to be
> from 22.00 until 06.00 the next day, and then kickoff again where it left
> later.
>
> A simple solution would be to have a second route with a scheduler that
> simply stops the file route and then starts it again later.
>
> Is there any even simpler way?
>

A scheduled route policy
http://camel.apache.org/routepolicy.html
http://camel.apache.org/scheduledroutepolicy.html

> --
> View this message in context: http://camel.465427.n5.nabble.com/Scheduling-the-file-component-to-only-process-at-specific-intervals-tp4722758p4722758.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Scheduling the file component to only process at specific intervals

Posted by Ashwin Karpe <ak...@fusesource.com>.
Hi,

Have you checked out the SceduleRoutePolicy in Camel. 

http://camel.apache.org/simplescheduledroutepolicy.html
http://camel.apache.org/simplescheduledroutepolicy.html 
http://camel.apache.org/cronscheduledroutepolicy.html
http://camel.apache.org/cronscheduledroutepolicy.html 

This should allow you to set up a batch job with a time interval in which
the route starts up, processes data and hen shuts down.

Hope this helps.

Cheers,

Ashwin...

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/Scheduling-the-file-component-to-only-process-at-specific-intervals-tp4722758p4723075.html
Sent from the Camel - Users mailing list archive at Nabble.com.