0% found this document useful (0 votes)
78 views6 pages

Steps To Schedule A Jenkins Job

Uploaded by

akmajith1998
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views6 pages

Steps To Schedule A Jenkins Job

Uploaded by

akmajith1998
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Steps to Schedule a Jenkins Job

1. Open the Job Configuration:


○ Go to your Jenkins dashboard.
○ Click on the desired job.
○ Select "Configure" from the left-hand menu.
2. Enable Periodic Build Trigger:
○ Scroll to the Build Triggers section.
○ Check the "Build periodically" option.
3. Add the Cron Expression:
○ Enter a cron expression in the provided box to specify the
schedule.

Cron Syntax in Jenkins

The syntax for the cron expression in Jenkins follows this structure:

MINUTE HOUR DAY_OF_MONTH MONTH DAY_OF_WEEK

● MINUTE: (0–59) The minute of the hour.


● HOUR: (0–23) The hour of the day.
● DAY_OF_MONTH: (1–31) The day of the month.
● MONTH: (1–12) The month of the year.
● DAY_OF_WEEK: (0–7) The day of the week (0 and 7 are Sunday).

Examples to Schedule Jobs at Specific Times

1. Run at 9:30 AM Every Day


30 9 * * *

www.grotechminds.com +918009900785 Making Life Better Everyday


● Minute: 30
● Hour: 9

2. Run at Midnight Every Day


00***

● Minute: 0
● Hour: 0

3. Run at 6 PM Every Day


0 18 * * *

● Minute: 0
● Hour: 18 (6 PM in 24-hour format)

4. Run Every Hour at 15 Minutes Past


15 * * * *

● Minute: 15
● Hour: * (Every hour)

5. Run Every Day at 7 AM and 7 PM


0 7,19 * * *

● Hour: 7 and 19 (7 PM)

6. Run Every Monday at 10 AM


0 10 * * 1

www.grotechminds.com +918009900785 Making Life Better Everyday


● Day of the week: 1 (Monday)

7. Run at 11:45 PM on the Last Day of Every Month


45 23 L * *

● Day of month: L (last day)

8. Run Every Weekday at 8:30 AM


30 8 * * 1-5

● Day of week: 1-5 (Monday to Friday)

9. Run Every Sunday at 3 AM


03**0

● Day of week: 0 (Sunday)

10. Run Every 2 Hours


0 */2 * * *

● */2: Every 2nd hour

11. Run Every 15 Minutes


*/15 * * * *

● */15: Every 15 minutes

www.grotechminds.com +918009900785 Making Life Better Everyday


12. Run on the 1st and 15th of Every Month at Noon
0 12 1,15 * *

● Day of month: 1,15

13. Run Every First Monday of the Month at 10 AM


0 10 1-7 * 1

● Day of month: 1-7


● Day of week: 1 (Monday)

14. Run at 5 PM on the 5th, 10th, and 20th of Every Month


0 17 5,10,20 * *

15. Run Every 10 Minutes Between 9 AM and 11 AM


*/10 9-11 * * *

● Hour: 9-11 (9 AM to 11 AM)

16. Run at 9:30 AM Only on Weekends


30 9 * * 6,0

● Day of week: 6,0 (Saturday and Sunday)

17. Run at 8 AM on the Last Friday of Every Month


0 8 * * 5#5

www.grotechminds.com +918009900785 Making Life Better Everyday


● 5#5: The last Friday of the month

18. Run Every 3 Days at 4 AM


0 4 */3 * *

● */3: Every 3rd day

19. Run Every 5 Minutes on the 1st Day of Each Month


*/5 * 1 * *

● Day of month: 1

20. Run at 10 PM on Even Days


0 22 */2 * *

Day of month: */2 (Every even day)

21. Run at 1 PM Every Day:

0 13 * * *

○ 0: On the 0th minute (start of the hour).


○ 13: At 13:00 (1 PM in 24-hour format).
○ * * *: Every day, every month, every day of the week.

22. Run at 3 PM Every Day:

0 15 * * *

www.grotechminds.com +918009900785 Making Life Better Everyday


23. Run at 1 PM and 3 PM Every Day:

0 13,15 * * *

○ 13,15: Specifies both 1 PM and 3 PM.

24. Run at 1 PM on Weekdays Only:

0 13 * * 1-5

○ 1-5: Days Monday through Friday.

How to Validate Corn Expressions

● Online Tools: Use tools like crontab.guru to validate and understand


cron expressions.
● Jenkins Scheduler Plugin: Install plugins like "Cron Column" for
easier schedule management.

www.grotechminds.com +918009900785 Making Life Better Everyday

You might also like