You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "S. Ali Tokmen" <sa...@bull.net> on 2010/11/08 10:30:26 UTC

A question about timer

Hello

I have a CAMEL route that I would like to have a route that executes 
everyday at 02:00 AM. If I have read the documentation correctly, 
http://camel.apache.org/timer.html indicates that:

   1. pattern=HH:mm
   2. time=02:00
   3. period=24hours

Is that correct?

Cheers

-- 

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


Re: A question about timer

Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello Claus

Thank you for these informations. Since I was looking for a timer-like 
behaviour, I did not think of looking into Quartz.

I guess that component is the ideal for my use case.

Cheers

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


On 08/11/2010 10:55, Claus Ibsen wrote:
> The timer is based on the JDK timer which really cant do nothing else
> than trigger every X interval.
>
> I do think the JDK timer has a rather peculiar feature where you can
> set a date when it should trigger the first time.
> Read its javadoc.
>
>
> If you need something like at specific times per day etc. you need
> CRON like expressions such as supported by camel-quartz
> http://camel.apache.org/quartz
>
> Quartz can really do what you want and its much more power full than
> the JDK timer.
>
>
> On Mon, Nov 8, 2010 at 10:30 AM, S. Ali Tokmen
> <sa...@bull.net>  wrote:
>> Hello
>>
>> I have a CAMEL route that I would like to have a route that executes
>> everyday at 02:00 AM. If I have read the documentation correctly,
>> http://camel.apache.org/timer.html indicates that:
>>
>>   1. pattern=HH:mm
>>   2. time=02:00
>>   3. period=24hours
>>
>> Is that correct?
>>
>> Cheers
>>
>> --
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@bull.net
>>
>> Office: +33 4 76 29 76 19
>> GSM:    +33 66 43 00 555
>>
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>>
>>
>
>


Re: A question about timer

Posted by Claus Ibsen <cl...@gmail.com>.
The timer is based on the JDK timer which really cant do nothing else
than trigger every X interval.

I do think the JDK timer has a rather peculiar feature where you can
set a date when it should trigger the first time.
Read its javadoc.


If you need something like at specific times per day etc. you need
CRON like expressions such as supported by camel-quartz
http://camel.apache.org/quartz

Quartz can really do what you want and its much more power full than
the JDK timer.


On Mon, Nov 8, 2010 at 10:30 AM, S. Ali Tokmen
<sa...@bull.net> wrote:
> Hello
>
> I have a CAMEL route that I would like to have a route that executes
> everyday at 02:00 AM. If I have read the documentation correctly,
> http://camel.apache.org/timer.html indicates that:
>
>  1. pattern=HH:mm
>  2. time=02:00
>  3. period=24hours
>
> Is that correct?
>
> Cheers
>
> --
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>



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

Re: A question about timer

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

Oops, you are right. I guess I did not understand the requirement
accurately. 

Sorry about any confusion caused...

Cheers,

Ashwin...

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

Blog: http://opensourceknowledge.blogspot.com
http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context: http://camel.465427.n5.nabble.com/A-question-about-timer-tp3254745p3255335.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: A question about timer

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 8, 2010 at 4:53 PM, Ashwin Karpe <ak...@fusesource.com> wrote:
>
> Hi,
>
> It is now possible to do route scheduling this out of the box in Camel 2.5.
>

This is only avail from 2.6 onwards.
And route scheduling is used for controlling when a route should be active.

Its not the same as scheduling a new message to be send into a route.
You still need a consumer to take in messages, and hence he need a
quarz consumer to trigger a message to be consumed on exactly that
time he want.

route scheduling is good for lets say to dictate when a web service
should be active. For example a SLA may dicate that it should only
operate during business hours and in the weekend it should be offline.


> Please check out
>
> http://camel.apache.org/scheduledroutepolicy.html
> http://camel.apache.org/scheduledroutepolicy.html
> http://camel.apache.org/cronscheduledroutepolicy.html
> http://camel.apache.org/cronscheduledroutepolicy.html
> http://camel.apache.org/simplescheduledroutepolicy.html
> http://camel.apache.org/simplescheduledroutepolicy.html
>
> Cheers,
>
> Ashwin...
>
>
>
> -----
> ---------------------------------------------------------
> Ashwin Karpe
> Apache Camel Committer & Sr Principal Consultant
> FUSESource (a Progress Software Corporation subsidiary)
> http://fusesource.com http://fusesource.com
>
> Blog: http://opensourceknowledge.blogspot.com
> http://opensourceknowledge.blogspot.com
> ---------------------------------------------------------
> --
> View this message in context: http://camel.465427.n5.nabble.com/A-question-about-timer-tp3254745p3255244.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
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: A question about timer

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

It is now possible to do route scheduling this out of the box in Camel 2.5.

Please check out

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

Cheers,

Ashwin...



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

Blog: http://opensourceknowledge.blogspot.com
http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context: http://camel.465427.n5.nabble.com/A-question-about-timer-tp3254745p3255244.html
Sent from the Camel - Users mailing list archive at Nabble.com.