timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-12388] Crontab @yearly and @anually are never triggered in 1.448 RC #7060

Closed timja closed 12 years ago

timja commented 12 years ago

Steps to reproduce:

  1. Install Jenkins 1.448 RC
  2. Create a free-style job and set its "Build periodically" schedule to @yearly
  3. Stop Jenkins
  4. Adjuest server's time to 2012-12-31 23:55
  5. Start Jenkins
  6. Wait until 2013-01-01, but the job is not triggerd

@yearly and @annually were interpreted to "0 0 1 1 *" by Jenkins 1.447.
On the other hand they are interpreted to "H H H H *" by Jenkins 1.448 RC
and "H" are hashed to "0 0 1 0 *".
Since there is no chanse for month to be 0,
@yearly and @annually are never triggered in 1.448 RC.

Workaround:
Instead of @yearly and @annually, use "0 0 1 1 *".

If JENKINS-12356 is fixed, this issue will be also fixed.


Originally reported by ohtake_tomohiro, imported from: Crontab @yearly and @anually are never triggered in 1.448 RC
  • assignee: ohtake_tomohiro
  • status: Closed
  • priority: Major
  • resolution: Fixed
  • resolved: 2012-02-08T01:37:43+00:00
  • imported: 2022/01/10
timja commented 12 years ago

abayer:

Looks to be related to/caused by https://github.com/jenkinsci/jenkins/commit/b1bb3f66676b550971db08725d5c3cef5b42191b

timja commented 12 years ago

ohtake_tomohiro:

As Sogabe has resolved JENKINS-12356, JENKINS-12388 has been resolved too.
Pull-344 has some test code
which checks if crontab will be eventually triggered or not.
Though the issue has been resolved, the test would be useful.

timja commented 12 years ago

dogfood:

Integrated in jenkins_main_trunk #1512
[FIXED JENKINS-12388] Add tests for JENKINS-12388 (Revision 240c381bb867873da8dc4984acc199b243aea48e)

Result = SUCCESS
ohtake.tomohiro : 240c381bb867873da8dc4984acc199b243aea48e
Files :

timja commented 12 years ago

scm_issue_link:

Code changed in jenkins
User: OHTAKE Tomohiro
Path:
core/src/test/java/hudson/scheduler/CronTabEventualityTest.java
http://jenkins-ci.org/commit/jenkins/240c381bb867873da8dc4984acc199b243aea48e
Log:
[FIXED JENKINS-12388] Add tests for JENKINS-12388

timja commented 2 years ago

[Originally related to: JENKINS-12356]