Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to schedule job in Jenkins every 4 hours and 10 minutes

Tags:

jenkins

I made jobs to start at every 4 hours H */4 * * * But I can't schedule at 4:10 I tried 10 */4 * * * and H/10 */4 * * * Unfortunately no luck

like image 548
user3740305 Avatar asked Jun 14 '14 11:06

user3740305


People also ask

How do I schedule Jenkins to run every 6 hours?

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.

How do I schedule Jenkins to run every 15 minutes?

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.

How do you automatically build the job for every hour in Jenkins when any changes are made in your Git SCM?

In Jenkins, go to the project configuration of the project for which you want to run an automated build. In the 'Build Triggers' section, select 'Github hook trigger for GITScm Polling'. Save your project.

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

In the case of 3rd, 4th and 5th parameters asterisks '*' are used which means that no specific day , month and weekday is defined so it would trigger every day for whole month.


1 Answers

Configuring a fixed time is very simple:

10 4 * * *

Your 10 */4 * * * means "run it every 4 hours, at minute 10".

See also http://www.adminschoice.com/crontab-quick-reference/ for reference.

EDIT

Sorry, from the description it seems you want to run it at exactly 4.10, but I then realized that in the title you say something different: every 4h and 10'. Do you mean e.g. at [1.10, 5.20, 9.30]? If so, try */10 */4 * * *.

Please provide an example with a sequence of times you expect, e.g. [2.10, 3.20, 4.30], so that it's more clear what you want.

like image 84
alb-i986 Avatar answered Nov 15 '22 07:11

alb-i986