Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5645

CronParser.getNextScheduledTime() for the first day of every month

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.9.0, 5.11.0
    • 5.11.2, 5.12.0
    • Broker
    • None
    • Windows, Java 1.6

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              tabish Timothy A. Bish
              adramirez Toni Ramírez
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: