| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
17.2.6
|
| Labels |
No labels
|
Issue Votes (0)
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
17.2.6
|
| Labels |
No labels
|
A job with a
ScheduleTriggerruns only on the days when the branch head has a new commit. If the job has already run on the head commit, with the same parameters, the scheduled trigger does not start a new build. The schedule is then effectively "run after each new commit, at most once a day", not "run every day".Steps to reproduce
Add a job with a schedule trigger, for example:
Let it run once at the scheduled time.
Push no new commit to
main.Wait for the next scheduled time.
Expected behaviour
The job runs again at each scheduled time, on the current head of
main, also when that commit was already built by this job.Actual behaviour
No build is started. A build starts again only on the first scheduled time after a new commit is pushed to
main.The build history of two of our projects shows this. Every scheduled build is on a different commit, and the days with no build are the days after which the branch had no new commit:
Why it matters
Some scheduled jobs do not depend on the commit, but on the state of something outside the repository:
For these jobs, skipping a build because the commit was already built is wrong.
Workarounds we found
POST /~api/job-runswith a date parameter. This works, but it needs a token and a system outside OneDev.Suggestion
One of:
@trigger_time@) that can be used in the parameter values of a schedule trigger, so each run has different parameters.