You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Erik (JIRA)" <ji...@apache.org> on 2011/03/05 06:29:55 UTC

[jira] Created: (AMQ-3199) CRON next scheduled time incorrectly calculated

CRON next scheduled time incorrectly calculated
-----------------------------------------------

                 Key: AMQ-3199
                 URL: https://issues.apache.org/jira/browse/AMQ-3199
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.5.0
         Environment: Windows Server 2003 with java 1.6.0_22
            Reporter: Erik
             Fix For: 5.5.0


A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.

In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik updated AMQ-3199:
----------------------

    Attachment: s2.jpg

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004289#comment-13004289 ] 

Timothy Bish commented on AMQ-3199:
-----------------------------------

Ok, now I see what you are running into.  Missed in the description that it was the second time around that was causing the issue, think the extra 60 second discussion confused me.  I can fix the problem with the day being wrong but having look more closely at the code I see where it can go wrong with other crontab entries.  

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: activemq-admin-query.txt, s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik updated AMQ-3199:
----------------------

    Attachment: s1.png

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004180#comment-13004180 ] 

Erik edited comment on AMQ-3199 at 3/8/11 8:31 PM:
---------------------------------------------------

I downloaded the latest 5.5 snapshot and repeated the issue. The issue still exists. I have attached two screen shots to show the problem.

s1.png shows the initial Cron Entry set to run Tuesday 3/8/2011 @ 12:11:35pm. s2.png shows the Cron Entry after the message was delivered. The next scheduled time is incorrectly set for 3/14/2011 @ 12:10:35pm which is Monday. It should be set for 3/15/2011 @ 12:10:35pm; i.e. Tuesday.

The activemq version I downloaded was apache-activemq-5.5-SNAPSHOT-bin-2011-03-06-03-55-16.zip.

      was (Author: aletheia7):
    I downloaded the latest 5.5 snapshot and repeated the issue. The issue still exists. I have attached two screen shots to show the problem.
  
> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004180#comment-13004180 ] 

Erik edited comment on AMQ-3199 at 3/8/11 8:25 PM:
---------------------------------------------------

I downloaded the latest 5.5 snapshot and repeated the issue. The issue still exists. I have attached two screen shots to show the problem.

      was (Author: aletheia7):
    I downloaded the latest 5.5 snapshot and repeated the issue. The issue still exists. I have attached to screen shots to show the problem.
  
> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik updated AMQ-3199:
----------------------

    Attachment: activemq-admin-query.txt

This file contains the output from the command "activemq-admin query" after the s2.png screen shot.

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: activemq-admin-query.txt, s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3199.
-------------------------------

    Resolution: Fixed

This should now be fixed in trunk, cron strings should now act like you'd expect.  If you find any issues please report the misbehaving cron strings.

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>         Attachments: activemq-admin-query.txt, s1.png, s2.jpg
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3199.
-------------------------------

    Resolution: Fixed
      Assignee: Timothy Bish

Added new test case for this cron entry in trunk, the next scheduled time was calculated correctly.

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Reopened: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik reopened AMQ-3199:
-----------------------


I downloaded the latest 5.5 snapshot and repeated the issue. The issue still exists. I have attached to screen shots to show the problem.

> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3199) CRON next scheduled time incorrectly calculated

Posted by "Erik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik updated AMQ-3199:
----------------------

    Description: 
A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.

In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.

I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

  was:
A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.

In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.


> CRON next scheduled time incorrectly calculated
> -----------------------------------------------
>
>                 Key: AMQ-3199
>                 URL: https://issues.apache.org/jira/browse/AMQ-3199
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows Server 2003 with java 1.6.0_22
>            Reporter: Erik
>             Fix For: 5.5.0
>
>
> A Cron Entry of "50 20 * * 5" with an AMQ_SCHEDULED_DELAY of 61000 (61 seconds) started at 2011-03-04 20:48:24. The last "5" in the Cron Entry specifies only Fridays and 2011-03-04 is a Friday. The cron job ran and set "next scheduled time" to be 2011-03-10 20:50:25. 2011-03-11 is a Thursday. The correct "next scheduled time" should be 2011-03-11 20:50:25; it should be Friday.
> In addition, the reason why I set the delay to 61000 was because with the default delay of 0, the job executes twice with a 60 second interval. I will file a separate issue.
> I believe the Cron Entry has a problem with using asterisks. I tried a Cron Entry of "27 19 1-31 1-12 6" which is a Saturday. It ran at 19:27 and then correctly set the "next scheduled time" to be on the next Saturday. This is a temporary workaround.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira