I'm using Jenkins for OnCommit and Nightly Builds. My Build Trigger is for example at the weekend:
H/25 * * * 0,6
or from Monday to Friday:
H/25 0-5 * * *
The nightly build runs every 25 minutes.
But this way I can't use the time effectively and if there are changes to the build length I always have to adjust it.
How can I make a build run permanently from 8pm to 6am for example. As soon as the first build is finished, the next one should start. Then at 6am the last build starts.
Solution
I am not necessarily recommending this solution but you could create a pipeline with a stage that calls itself between certain hours. You would probably need to disable concurrent executions and configure the build declarative to not wait and not propagate errors.