How to schedule jobs in Jenkins

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery.

In some cases we need to schedule Jenkins jobs to run in specific times. We can configure this via Jenkins "Build Triggers" option.

This option is available in the Jenkins job configuration section and we need to specify the time for running the job. Jenkins will trigger the job automatically.

Jenkins cron format requires the following fields.

MINUTES Minutes in one hour (0-59)
HOURS Hours in one day (0-23)
DAYMONTH Day in a month (1-31)
MONTH Month in a year (1-12)
DAYWEEK Day of the week (0-7) where 0 and 7 are sunday

For example, If you want to schedule your build every day at 1AM, the cron format will be: 0 1 * * *

That's all…

Leave a Reply