How do I schedule jobs in Jenkins? -Jenkins Schedule

979    Asked by NakanoHase in Devops , Asked on Jul 15, 2021

I have added a new job in Jenkins, which I want to schedule periodically.

From Configure job, I am checking the "Build Periodically" checkbox and in the Schedule text field added the expression:

15 13 * * *

But it does not run at the scheduled time.

Is it the correct procedure to schedule a job?

The job should run at 4:20, but it is not running.

Want to know about jenkins schedule. 

 


Answered by Manish Nagar

By setting the jenkins schedule period to 15 13 * * * you tell Jenkins to schedule the build every day of every month of every year at the 15th minute of the 13th hour of the day.

Jenkins used a cron expression, and the different fields are:

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 more information please refer:https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/triggers/TimerTrigger/help-spec.jelly

For scheduling the job at 4:20 AM. then you can use:

20 4 * * *



Your Answer

Interviews

Parent Categories