Scheduled job builds are not triggering on time

Issue

  • Having set Build Triggers as Build Periodically at a specific time in the job configuration, Jenkins System triggers builds on a different time.

As an example:

On the Job Configuration

job config

On the Job Build History

job build history

Environment

  • Jenkins
  • CloudBees Jenkins Enterprise

Resolution

Ensure that Jenkins instance and users are aligned into the same Timezone.

In the case they are not aligned, you can edit it:

  • At Jenkins Server level as explained in Change Time Zone. For instances with users working across different Time Zones, the recommendation would be to set it to UTC.
  • At Job level a Timezone ID can be specified in the cron tab ( TZ=<Timezone ID>). It overrides the Server time zone if it was in some other. For instance:
TZ=America/Chicago
00 19 * * * 

Note: To list available timezones ids in Jenkins, run the following script into <JENKINS_SERVER>/script

def timezones = TimeZone.getAvailableIDs()
for (i in timezones){
  println i
  
}
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.