On Tue, Aug 26, 2014 at 5:43 PM, scottdawson <sc.e.daw...@gmail.com> wrote:

> Hello,
> What is the proper way to configure a timer that fires every day at 10 AM?
>
> I have this, which works, but it seems artificial to have to specify a date
> and sometimes the service seems to get confused on redeploy and fire
> repeatedly if I forget to update the date.
>    <camelContext xmlns="http://camel.apache.org/schema/blueprint";>
>       <route>
>         <from
> uri="timer://ncbidnld?fixedRate=true&amp;period=24hours&amp;time=2014-08-27
> 10:00:00"/>
>
> This throws a ParseException: Unparseable date:
>         <from
>
> uri="timer://ncbidnld?fixedRate=true&amp;period=24hours&amp;time=10:00:00"/>
>
> It's not obvious from the documentation page what the proper alternative
> might be.
>
> This is Camel 2.13.2 within ServiceMix 5.1.1.
>
> Thanks,
> Scott
>

Have you considered the Quartz or Quartz2 components?  They take a cron
spec and don't require a date.

http://camel.apache.org/quartz.html
http://camel.apache.org/quartz2.html

Don

Reply via email to