You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "andreas.hill@de.opel.com" <an...@de.opel.com> on 2014/07/11 09:50:21 UTC

How to

This route runs only once a day @ 1pm. 
I want this route to  to run several times a day at specified times (1pm,
4pm,...)
Since I cannot just duplicate the line to add a 4pm-execution, I am stuck.
I am hoping I do not need to duplicate the RESP and the REQ routes to
accomplish the interface to run several times a day.

<from uri="quartz://XXXnameRequestTimer?cron=0+0/1+*+*+*+?"/>

Anyone able to help/advise ?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-tp5753699.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Its using a cron syntax to define the times to run. Search the web for
cron tutorials, as you can specfify that also, eg run at 1pm and 4pm
etc.

On Fri, Jul 11, 2014 at 8:50 AM, andreas.hill@de.opel.com
<an...@de.opel.com> wrote:
> This route runs only once a day @ 1pm.
> I want this route to  to run several times a day at specified times (1pm,
> 4pm,...)
> Since I cannot just duplicate the line to add a 4pm-execution, I am stuck.
> I am hoping I do not need to duplicate the RESP and the REQ routes to
> accomplish the interface to run several times a day.
>
> <from uri="quartz://XXXnameRequestTimer?cron=0+0/1+*+*+*+?"/>
>
> Anyone able to help/advise ?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-tp5753699.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: How to

Posted by akoufoudakis <ak...@gmail.com>.
Try this route:

<from uri="quartz://XXXnameRequestTimer?cron=0+0+13,16+*+*+?"/>

It runs twice per day (1PM, 4PM) each day of the week.

But, as Claus pointed out, just check a cron expression tutorial online.
There should be plenty of them. Sure, there should be also "expression
builders", which allow you to check if your expression is valid. 
The only difference between "usual" cron expression and cron expression in
the camel route is that instead of spaces, you have to use + sign in the
camel route. 



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-tp5753699p5753701.html
Sent from the Camel - Users mailing list archive at Nabble.com.