Home > OS >  What is the default timezone of Jenkins cron job
What is the default timezone of Jenkins cron job

Time:11-22

I am using Jenkins declarative pipeline, in which I am trying to run the pipeline every day Mon-Fri at 9a.m. Berlin timezone. But I am not sure what TZ by default is used by jenkins. My JenkinsFile looks like this.

pipeline {
    agent none
    triggers {
            cron('0 9 * * *') //schedule your build every day at 9h 00
        }
    stages {
        stage('stage') {
          agent any
            steps {
              echo 'Hello world'
            }
        }
    }
}

CodePudding user response:

By default, your Jenkins will use the system time zone configuration. You can check your time-zone configuration by going to the "Manage Jenkins" ⇒ "System Information" page and finding the user.timezone property.

You may want to change the time zone displayed to match your own time zone. By going to your user configuration page, you can set the User Defined Time Zone to match your own.

You can find more information here: https://www.jenkins.io/doc/book/using/change-time-zone/.

  • Related