How can a build pipeline be scheduled to execute at a certain time of the night just like a regular job can be?
If you want to run the job periodically for a specific branch using a multibranch pipeline you can do this in your Jenkinsfile:
def call(String cronBranch = 'master') {
// Cron job to be run from Monday to Friday at 10.00h (UTC)
String cronString = BRANCH_NAME == cronBranch ? "0 10 * * 1-5" : ""
pipeline {
agent any
triggers {
cron(cronString)
}
stages {
stage('My Stage') {
//Do something
}
}
}
}
You need to run this job manually the first time in order to be added.