I need to able to configure every 6PM and 1 AM in build periodically section, any examples could you pass on?
Add a Schedule to a Jenkins JobHead back to the job configuration and click the Build Triggers tab. Now, check the Build periodically box in the Build Triggers section. This will open the scheduling text area. Next, let's set the job to run every five minutes.
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.
CRON in JenkinsIn the Jenkins job's “Configure” option, we'll want to navigate to the “Build Trigger” tab, where we'll see the checkboxes for “Poll SCM” and “Build Periodically.” These are the options where we must be familiar with CRON syntax and its function to configure our Jenkins Build.
Press the "Schedule Build" link on the project page or use the schedule build action in the list view. Then select date and time when to schedule the build. The build will be added to the build queue with the respective quiet period.
Each Job has a Build Trigger
section where you can configure to Build periodically
. The syntax is cron-like so you have to add 0 1,18 * * *
to build at 1AM and 6PM.
Another Alternative is like H(0-0) 1-18 * * *
Jenkins cron has following syntax
1 Parameter - Minutes in one hour (0-59)
2 Parameter - HOURS Hours in one day (0-23)
3 Parameter - DAYMONTH Day in a month (1-31)
4 Parameter - MONTH Month in a year (1-12)
5 Parameter - DAYWEEK Day of the week (0-7)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With