-
Improvement
-
Resolution: Unresolved
-
Minor
Currently we can only choose a period, which is then used to define a crontab (https://github.com/jenkinsci/cloudbees-folder-plugin/blob/7e6294bc48d4cddc89c129ceaf1ab6d352462425/src/main/java/com/cloudbees/hudson/plugins/folder/computed/PeriodicFolderTrigger.java#L117).
For example: 1 day period => `H H 0 0 0` crontab:
```
<triggers>
<com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.4">
<spec>H H * * *</spec>
<interval>86400000</interval>
</com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
</triggers>
```
Feature request: Make `spec`/crontab configurable via GUI.
Goal: re-scan only at night, because it can trigger a lot of builds, filling Jenkins build queue.
Scenario:
- Lots of pending PR on github
- Jenkins config: build PR by merging target branch first
- New commits on target branch
=> an automatic re-scan mid-day triggers a re-build of all pending PR, saturating the Jenkins cluster for may hours.
What I tried:
Manually edit the `config.xml` file, reloading the config from disk on Jenkins: Modification gets lost on next GUI save, overwritten by a static value determined from period.