I want to schedule periodic build in jenkins which should run once daily at 9 am till a specific day (example, if today is 1st of dec then it should run from 1st to 7th of dec only)
For running every day at 9 am the script is-
H 9 * * *
What should I add to run it till specific date only?
Cron expressions support range selectors. For your specific example, you can specify that it should run from the 1st to 7th of december only:
* 9 1-7 12 *
“At 09:00 on every day-of-month from 1 through 7 in December.”
You can easily test your expression here. Since you can't specify the year in a cron expression, you will have to remove trigger manually afterwards.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments