camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel Quartz2 scheduler runs the route twice
Date Mon, 30 Oct 2017 19:29:18 GMT
Its been a while since I hacked cron jobs, but I think 0/48 means
every 0th and 48th minute. If you only want 48th, then its just 48.


On Mon, Oct 30, 2017 at 7:37 PM, Christine Vladic
<Christine.Vladic@standard.com> wrote:
> Hello,
>
> Reporting an issue with Camel Quartz 2 v 2.19.0 that it triggers the route twice.
>
> I have a spring boot camel app with a quartz2 endpoint configured to run on 7:48PM. 
As I reviewed the application log, I noticed that the scheduler triggers the route twice 2017-10-29
19:00:00.036  and 2017-10-29 19:48:00.009 .
>
> Service configuration:
>
>     <dependencyManagement>
>    <dependencies>
>       <dependency>
>          <groupId>org.springframework.boot</groupId>
>          <artifactId>spring-boot-dependencies</artifactId>
>          <version1.5.3.RELEASE</version>
>          <type>pom</type>
>         <scope>import</scope>
>       </dependency>
>       <dependency>
>          <groupId>org.apache.camel</groupId>
>          <artifactId>camel-spring-boot-dependencies</artifactId>
>          <version>2.19.0</version>
>          <type>pom</type>
>          <scope>import</scope>
>       </dependency>
>    </dependencies>
>    </dependencyManagement>
>
>    <dependencies>
>         <dependency>
>             <groupId>org.apache.camel</groupId>
>             <artifactId>camel-quartz2</artifactId>
>         </dependency>
>    </dependencies>
>
> Quartz2 Endpoint - run every 7:48 PM:
>
>    from("quartz2://serviceQuartz?cron=0+0/48+19+*+*+?&trigger.timeZone=America/Los_Angeles")
>
> Application Log:
>
> 2017-10-29 19:00:00.036  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.camel.impl.DefaultShutdownStrategy   : Stops the main route
> 2017-10-29 19:00:00.210  INFO 28215 --- [Camel (MyCamelService) thread #1 - ShutdownTask]
o.a.camel.impl.DefaultShutdownStrategy   : .....
> 2017-10-29 19:00:00.212  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.camel.impl.DefaultShutdownStrategy  : .....
> 2017-10-29 19:00:00.217  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.camel.spring.SpringCamelContext      :  ......
> 2017-10-29 19:00:00.223  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.c.c.controlbus.ControlBusProducer    :  .....
> 2017-10-29 19:00:00.228  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
MyCamelService                        : Scheduled job - Creating an empty file /test/output_20171029.dat
since there are no MNA records processed.
> 2017-10-29 19:00:00.264  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.c.component.quartz2.QuartzComponent  : The scheduler has already been started.
> 2017-10-29 19:00:00.275  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.camel.spring.SpringCamelContext      :  ......
> 2017-10-29 19:00:00.278  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-1]
o.a.c.c.controlbus.ControlBusProducer    : ......
>
> 2017-10-29 19:48:00.009  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.camel.impl.DefaultShutdownStrategy   : Stops the main route
> 2017-10-29 19:48:00.328  INFO 28215 --- [Camel (MyCamelService) thread #3 - ShutdownTask]
o.a.camel.impl.DefaultShutdownStrategy   :  .....
> 2017-10-29 19:48:00.331  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.camel.impl.DefaultShutdownStrategy   : .....
> 2017-10-29 19:48:00.334  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.camel.spring.SpringCamelContext      :   .....
> 2017-10-29 19:48:00.336  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.c.c.controlbus.ControlBusProducer    :  .....
> 2017-10-29 19:48:00.339  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
MyCamelService                        : Scheduled job - Creating an empty file /test/output_20171029.dat
since there are no MNA records processed.
> 2017-10-29 19:48:00.375  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.c.component.quartz2.QuartzComponent  : The scheduler has already been started.
> 2017-10-29 19:48:00.388  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.camel.spring.SpringCamelContext      :  .....
> 2017-10-29 19:48:00.408  INFO 28215 --- [DefaultQuartzScheduler-MyCamelService_Worker-2]
o.a.c.c.controlbus.ControlBusProducer    : .....
>
> Thank you,
> Christine



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message