jenkinsci / jenkinsci/cloudbees-folder-plugin

[JENKINS-51879] Scan Repository Trigger Periodically : configurable crontab (`spec`)

Open
#668 3 comments 0 reactions 0 assignees View on GitHub
component:cloudbees-folder-plugin imported-jira-issue priority:minor resolution:unresolved ux
Dominant language
Java
Stars
59
Forks
117
PR merge metrics
No merged PRs in 30d

Description

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:

```





H H * * *

86400000



```

 

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.

---
Originally reported by thomas_deepomatic, imported from: Scan Repository Trigger Periodically : configurable crontab (`spec`)


  • status: Open
  • priority: Minor
  • component(s): cloudbees-folder-plugin
  • label(s): configuration, user-experience
  • resolution: Unresolved
  • votes: 5
  • watchers: 6
  • imported: 20251211-141027

Raw content of original issue

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.