[jboss-jira] [JBoss JIRA] (WFLY-1468) Incorrect scheduling of Timers with hour range and minute interval

Pawel Tur (JIRA) jira-events at lists.jboss.org
Fri Jun 7 03:58:54 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-1468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780032#comment-12780032 ] 

Pawel Tur commented on WFLY-1468:
---------------------------------

I also noticed that:

1) If the start date is in the past, but the day of the month is *before* the current day of the month, current time will be used. 
2) If the start date is in the past, but the day of the month is *after* the current day of the month, everything is fine. 

e.g. Today is 07-06-2013, if I set the schedule start to:

1) 05-05-2013, so the day of the month is 05 which is obviously before 07, current time will be used, which is incorrect.
2) 09-05-2013, so the day of the month is 09 which is obviously after 07, correct behavior is applied.

It seems that the JBOSS AS TimerService implementation is taking into account in this case merely the day of the month, forgetting to compare the month itself (whether it's in the past, presence or future)




                
> Incorrect scheduling of Timers with hour range and minute interval
> ------------------------------------------------------------------
>
>                 Key: WFLY-1468
>                 URL: https://issues.jboss.org/browse/WFLY-1468
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>         Environment: JBoss AS 7.1.1
>            Reporter: Pawel Tur
>            Assignee: jaikiran pai
>              Labels: jboss
>         Attachments: TimerIssue.java
>
>
> When trying to schedule execution of an EJB 3.1 timer e.g. with the following rule:
> Every 3rd of a month between 00:00 till 12:00 every 5 minutes starting from 03.06.2013. The execution time is calculated incorrectly. 
> The first execution should be started on 03.07.2013 at 00:00, instead it starts at 03.07.2013 at 10:15, note: in the given example current time is 10:10. For some reason the TimerService takes into account the current locale time, although it should be irrelevant in such case.
> Example code is attached, when execute the following output is produced:
> Current time: Thu Jun 06 10:10:57 CEST 2013
> Next execution time: Wed Jul 03 10:15:00 CEST 2013
> When the same code is executed on glassfish  the following (IMHO correct) output is produced:
> Current time: Thu Jun 06 10:09:26 CEST 2013
> Next execution time: Wed Jul 03 00:00:00 CEST 2013

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list