camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christine Vladic <Christine.Vla...@standard.com>
Subject RE: Camel Quartz2 scheduler runs the route twice
Date Mon, 30 Oct 2017 20:48:45 GMT
Hi Claus,

Thanks for the response.  You are right.  I will apply the change.

Thank you,
Christine


-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Monday, October 30, 2017 12:29 PM
To: dev <dev@camel.apache.org>
Subject: Re: Camel Quartz2 scheduler runs the route twice

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=Am
> erica/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
-----------------
https://urldefense.proofpoint.com/v2/url?u=http-3A__davsclaus.com&d=DwIBaQ&c=8cFkWstqZYH09bQ2dZGSn7GyHTMJxzHALGGH69mOKEE&r=YBTWivlmxEA_jW7QqPA5MOszJZ4ISTDk5QEuCBOv6m0&m=F8a3g3oYrMWHSoujKva7tEBvlmsLNL2q4BewilpCbTc&s=PD45YQ-KYln4Xepav2MIly9pufvPzxHO4-2a4Ukv2Bo&e=
@davsclaus Camel in Action 2: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.manning.com_ibsen2&d=DwIBaQ&c=8cFkWstqZYH09bQ2dZGSn7GyHTMJxzHALGGH69mOKEE&r=YBTWivlmxEA_jW7QqPA5MOszJZ4ISTDk5QEuCBOv6m0&m=F8a3g3oYrMWHSoujKva7tEBvlmsLNL2q4BewilpCbTc&s=7OB_ysX6aF5C5YNtQHPmLdKku6SzoRbjo1yZ9P8kIbU&e=
Mime
View raw message