Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to schedule a Jenkins job each 15 minutes [duplicate]

I need to schedule a jenkins job each 15 minutes.

Currently i'm using the Build periodically feature but that enables me to schedule the job once in 1 hour maximum.

What i got now is:

15 * * * * is running the job HOURLY (each XX:15)

15 0 * * * is running the job DAILY on 00:15

What is the right cron-expression that will run the job every 15 minutes?

like image 949
shayms8 Avatar asked Aug 01 '16 15:08

shayms8


People also ask

How do I schedule Jenkins to run every 15 minutes?

A job that runs every 15 minutes has H/15 in the first field. Note that the H in the first field has a special meaning. If you wanted a job to run every 15 minutes, you could configure it as 0/15, which would make it run at the start of every hour.

How do I schedule a Jenkins periodically?

The steps for schedule jobs in Jenkins:click on "Configure" of the job requirement. scroll down to "Build Triggers" - subtitle. Click on the checkBox of Build periodically. Add time schedule in the Schedule field, for example: @midnight.

What is the meaning of * * * * * In the schedule text box of the build trigger section?

In the Build Triggers section, instead of selecting Build Periodically, let's select Poll SCM. As soon as we do that, we should see a text box with Label Schedule. Let's type */5 * * * * in this box, which means we want to schedule the job to run every 5 minutes: Let's scroll up to Source Code Management section.


1 Answers

To run the job at a regular interval of 15 minutes you have to write it like below:

*/15 * * * * - Will run at every 15 minutes (may be at XX:01,XX:16,XX:31 ..)

Where */15 specifies no matter whatever is Hour (H) run it at 15 every minutes.

like image 198
Priyanshu Shekhar Avatar answered Oct 05 '22 22:10

Priyanshu Shekhar