Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6BC4310688 for ; Thu, 20 Jun 2013 07:09:24 +0000 (UTC) Received: (qmail 78637 invoked by uid 500); 20 Jun 2013 07:09:24 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 78272 invoked by uid 500); 20 Jun 2013 07:09:23 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 78130 invoked by uid 99); 20 Jun 2013 07:09:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 07:09:23 +0000 Date: Thu, 20 Jun 2013 07:09:23 +0000 (UTC) From: "Rafael Alfaro (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AMQ-4591) org.apache.activemq.broker.scheduler.CronParser bug on getNextScheduledTime() to handle the once per minute case "* * * * *" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Rafael Alfaro created AMQ-4591: ---------------------------------- Summary: org.apache.activemq.broker.scheduler.CronParser bug on getNextScheduledTime() to handle the once per minute case "* * * * *" Key: AMQ-4591 URL: https://issues.apache.org/jira/browse/AMQ-4591 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.8.0, 5.9.0 Environment: Any Reporter: Rafael Alfaro There is a Bug on handle the once per minute case. For the cronentry: "* * * * *" The Next Scheduled time is not the top of the next minute. Instead, is the current Time plus 60 seconds The problem is that the code is trying to set the precision at seconds, but the precision must have to be at minutes. It can be fixed in this way: Index: activemq-client/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java =================================================================== --- activemq-client/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java (revision 1494862) +++ activemq-client/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java (working copy) @@ -44,7 +44,7 @@ // starting the next event at the top of the minute. if (cronEntry.equals("* * * * *")) { result = currentTime + 60 * 1000; - result = result / 1000 * 1000; + result = result / 60000 * 60000; return result; } -- 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