Limit build to run only in specific time domain in TeamCity

929 views Asked by At

I have a build with a finish build trigger and i want to limit it to run only in specific time domain (e.g. between 4 AM to 5 AM) regardless to the finish build trigger, any suggestions?

3

There are 3 answers

1
infojolt On

You could remove the finish build trigger and add an extra step to the triggering build which calls the rest api.

By adding a bit of logic around the call the check the time is in the required range, you should be able to achieve what you are after.

1
Biswajit_86 On

You can use cron-like expressions to write schedule triggers that will trigger your build at customized times. You can read the teamcity specs here

For example , if you want to run a target everyday at 4.30 AM , you would have to define it in the following syntax.

Seconds         0
Minutes         30
Hours           4
Day-of-month    *
Month           *
Day-of-week     ?
4
Alina Mishina On

Another solution is to pause build configuration. You can pause build configuration using REST API.