I have a TeamCity Build Configuration which runs tests during the night on a large amount of machines. It is important that these tests do not run during the day.
The Build is kicked off with a Schedule Trigger which fires at 1am each day. I have set the Build to time out if it runs for longer than 6 hours, so it stops at around 7am.
I looked at the latest Build this morning and found that the associated Build Agent was unavailable; therefore the Build was still queued.
Had the Build Agent become available, say, at 6am, then I assume the queued Build would have kicked off and continued to run until 11am. I do not want the Build to be running after 7am.
Is there any way I can prevent a Build from starting if it has been queued for too long?
Or, is it possible to stop a Build dead at a particular time? In this case I would also need to prevent the Build from starting in the first place, if it was queued beyond 7am.