Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12357

Infinite loop or invalid next execution with crontab DoW=7

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Jenkins 1.446
      Next Executions plugin 1.0.2

      Similar to JENKINS-12356, setting DoW=7 may stuck in an infinite loop or may output an invalid next execution time.

      A workaround is to use DoW=0. It is true that the help says "The day of the week (0-7) where 0 and 7 are Sunday", but 0 is safer.

          [JENKINS-12357] Infinite loop or invalid next execution with crontab DoW=7

          I have raised pull-344.
          See test code for what situation makes Jenkins stuck in an infinite loop or makes him guess wrong.

          OHTAKE Tomohiro added a comment - I have raised pull-344 . See test code for what situation makes Jenkins stuck in an infinite loop or makes him guess wrong.

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/8b8c62a891088adabab20f872342413a600371da
          Log:
          updated changelog for JENKINS-12357

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html http://jenkins-ci.org/commit/jenkins/8b8c62a891088adabab20f872342413a600371da Log: updated changelog for JENKINS-12357

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1512
          [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday) (Revision 20249e4adc4abaf3c81cd864331508cf68b8777b)

          Result = SUCCESS
          ohtake.tomohiro : 20249e4adc4abaf3c81cd864331508cf68b8777b
          Files :

          • core/src/main/java/hudson/scheduler/CronTab.java
          • core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java
          • core/src/test/java/hudson/scheduler/CronTabTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #1512 [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday) (Revision 20249e4adc4abaf3c81cd864331508cf68b8777b) Result = SUCCESS ohtake.tomohiro : 20249e4adc4abaf3c81cd864331508cf68b8777b Files : core/src/main/java/hudson/scheduler/CronTab.java core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java core/src/test/java/hudson/scheduler/CronTabTest.java

          Code changed in jenkins
          User: OHTAKE Tomohiro
          Path:
          core/src/main/java/hudson/scheduler/CronTab.java
          core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java
          core/src/test/java/hudson/scheduler/CronTabTest.java
          http://jenkins-ci.org/commit/jenkins/20249e4adc4abaf3c81cd864331508cf68b8777b
          Log:
          [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday)

          To use @Test(timeout), inheritance from TestCase should be removed

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: OHTAKE Tomohiro Path: core/src/main/java/hudson/scheduler/CronTab.java core/src/test/java/hudson/scheduler/CronTabDayOfWeekLocaleTest.java core/src/test/java/hudson/scheduler/CronTabTest.java http://jenkins-ci.org/commit/jenkins/20249e4adc4abaf3c81cd864331508cf68b8777b Log: [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday) To use @Test(timeout), inheritance from TestCase should be removed

            ohtake_tomohiro OHTAKE Tomohiro
            ohtake_tomohiro OHTAKE Tomohiro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: