Home > Continuous Integration, Software Engineering > How to schedule jobs in Jenkins / Triggering a Build Job

How to schedule jobs in Jenkins / Triggering a Build Job

In the job configuration one can define various build triggers. With periodically build enabled in the Build Triggers section it is possible to schedule a job.

jenkins_build_triggers

The cron-syntax for triggering a job in Jenkins looks like this:
minute (0-59), hour (0-23), day (1-31), month (1-12), day of week (0-7)

Examples:

# start build daily at morning
03 09 * * 1-5

# start build daily at lunchtime
00 12 * * 1-5

# start build daily in the afternoon
00 14 * * 1-5

# start build daily in the late afternoon
00 16 * * 1-5

#start build at midnight
#@midnight
59 23 * * 1-5

For more informations about Jenkins have a look at the book Jenkins: The Definitive Guide of John Ferguson Smart
here.
jenkins-continuous-integration-cookbook

or
The Jenkins Continuous Integration Cookbook of Alan Mark Berg here.
jenkins-the-definitive-guide

Advertisements
  1. santhosh
    January 3, 2015 at 10:16

    I want to run the job every 30 min daily but it should not be triggered between 13-15 hours

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: