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

2 Comments

  • -1
    Avatar
    Manoj Akondi

    Hi Team,

    We've configured the Timezone in our Jenkins. But still we are having issues with Scheduled jobs. It'd be great if you can help me on this.

  • 0
    Avatar
    Denys Digtiar

    Hi Manoj,

    If you a CloudBees customer feel free to raise a support ticket.

Please sign in to leave a comment.