Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-57318

A daily scheduled staging publish will not work next month if it is scheduled on the 30th



      A scheduled staging publish will not work next month if it is scheduled on the 30th

      Original logic: dayOfMonth += StringPool.FORWARD_SLASH + interval;
      Problem: If the day of the month is the 30th, we will create a cron interval of 30/1. Meaning run everyday starting on the 30th. So next month, the schedule will start on the 30th, rather than on the first.
      Proposed Solution: Change to: dayOfMonth = 1 + StringPool.FORWARD_SLASH + interval;
      So we start the interval on the first of the month.

      Steps to Reproduce

      1. Start a clean bundle of Liferay 6.2 with the latest patch installed.
      2. Change the date on your computer to 6/30/2015.
      3. On the default site, enable local live staging (also reproduced in remote live).
      4. On the Staging site, click publish > Schedule > Enter date (6/30/2015) and the time for 5 minutes in the future.
      5. Select "Daily" to ensure the publish will occur at the specified time every day. Save.
      6. Add a web content display
      7. Change the date on your computer to 7/1/2015 (without restarting).
      8. Log back into the portal if needed.
      9. Wait for the scheduled publish time and then refresh the live site to see if the changes were published.

      Expected Result: The publish will go through at the scheduled time.
      Actual Result: The publish does not go through

      Run a groovy script to note the "SchedulerEngineHelperUtil.getNextFireTime()" and note that after the first publish, it's next fire time is July 30th, rather than July 1st.

      Branch 62x - fc0e3be7804c4453818eb2a1972717563eb41980: Reproduced
      Master - 1dc5757b612c985268735dc6561efab4fe77004e: Reproduced


          Issue Links



              lu.liu Lu Liu
              steven.smith Steven Smith (Inactive)
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              0 Vote for this issue
              2 Start watching this issue


                Days since last comment:
                6 years, 38 weeks, 4 days ago


                  Version Package
                  6.1.X EE
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M7