Add possibility to schedule builds via a timer#448
Open
mawinter69 wants to merge 13 commits intojenkinsci:masterfrom
Open
Add possibility to schedule builds via a timer#448mawinter69 wants to merge 13 commits intojenkinsci:masterfrom
mawinter69 wants to merge 13 commits intojenkinsci:masterfrom
Conversation
The approach to scheduler the build by adding it to the queue with a delay has some disadvantes. When some triggers a build the regular way that can lead to the scheduled execution to be lost. This change adds another way of scheduling that will add the execution internally to a list. A periodic background work will run every minute and start the build accordingly. If the job should run not a 0 seconds, the remaining time is added as delay, so a job stays in the queue for not more then 60 seconds. This approach also allows the define a dedicated cause and the parameters of the job can be queried in the same UI where the start time is entered.
c5beea0 to
d25e040
Compare
use a dedicated file
Use a ScheduledExecutorService to delay the start for second precision scheduling
Contributor
|
@mawinter69 I think this is a great approach but I don't use the schedule build plugin enough to justify the testing to merge it. I think it would be best if I removed myself as a maintainer and let you be the sole maintainer of the plugin. You are welcome to merge and release this pull request at any time. Would you be OK if I remove myself as a maintainer of the plugin and left you as the sole maintainer? |
Contributor
Author
|
Actually as of now I'm not a maintainer at all. I don't have any permissions. |
Contributor
My mistake. Are you interested in being the maintainer? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The approach to scheduler the build by adding it to the queue with a delay has some disadvantages. When someone triggers a build the regular way that can lead to the scheduled execution to be lost.
This change adds another way of scheduling that will add the execution internally to an internal list. A periodic background work will run every minute and start the build accordingly.
This approach also allows the define a dedicated cause and to decide whether to skip execution when the schedule is missed (e.g. because Jenkins was down).
Parameters are now entered on the same page where the schedule is entered, avoiding the problem that the schedule time was not exact for parameterized jobs.
As the new mode is not adding things to the queue immediately, an additional page is added where the planned builds are listed with time and parameters and given proper permissions to cancel them.
this fixes the following tickets:
Open points:
Screenshots:


Testing done
Submitter checklist