You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/08/04 18:00:06 UTC
[jira] [Commented] (AMQ-5645) CronParser.getNextScheduledTime() for
the first day of every month
[ https://issues.apache.org/jira/browse/AMQ-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653854#comment-14653854 ]
ASF subversion and git services commented on AMQ-5645:
------------------------------------------------------
Commit 2c166b7605dad1dc622d1bdd23061c0fa1bcd4ad in activemq's branch refs/heads/activemq-5.11.x from [~mwarhaftig]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=2c166b7 ]
AMQ-5645 - Updated DayOfMonth cron to roll to next month properly.
> CronParser.getNextScheduledTime() for the first day of every month
> ------------------------------------------------------------------
>
> Key: AMQ-5645
> URL: https://issues.apache.org/jira/browse/AMQ-5645
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.9.0, 5.11.0
> Environment: Windows, Java 1.6
> Reporter: Toni RamÃrez
> Assignee: Timothy Bish
> Fix For: 5.11.2, 5.12.0
>
>
> When we try to get a NextSecheduledTime for a cron string that should return next month's first day ("0 1 1 * *") we get current month's last day.
> For example:
> public static void main(String[] args){
>
> try{
>
> Date miFecha = new Date(CronParser.getNextScheduledTime("0 1 1 * *", System.currentTimeMillis()));
>
> System.out.println(miFecha);
>
>
> }catch(Exception e){
>
> e.printStackTrace();
> }
>
>
> }
> This prints:
> Tue Mar 31 01:00:00 CEST 2015
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)