I think this should do roughly what you are after (untested). It should trigger a build when ProjectLast
is at status Success
(checking every 30 seconds), and the time is between 14:00
and 18:00
(checking the time every 60 seconds).
<multiTrigger operator="And">
<triggers>
<projectTrigger serverUri="tcp://server:21234/CruiseManager.rem" project="ProjectLast">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild" />
</projectTrigger>
<filterTrigger startTime="14:00" endTime="18:00">
<trigger type="intervalTrigger" seconds="60" />
<weekDays>
<weekDay>Sunday</weekDay>
</weekDays>
</filterTrigger>
</triggers>
</multiTrigger>
The documentation for cruisecontrol configuration (specifically triggers) should have enough explanation on all the possibilities.
Edit:
So at the moment, you have something (I imagine) which looks like this:
<project name="ProjectLast">
<tasks>
<!-- some build tasks etc etc -->
<forcebuild>
<project>MyUtility $(ccnet_branchlabel)</project>
<integrationStatus>Success</integrationStatus>
<enforcerName>ProjectLast $(ccnet_branchlabel)</enforcerName>
</forcebuild>
</tasks>
</project>
<project name="MyUtility">
<tasks>
<!-- whatever it is "MyUtility" does goes here -->
</tasks>
</project>
I am suggesting to change the configs to this:
<project name="ProjectLast">
<tasks>
<!-- some build tasks etc etc -->
</tasks>
</project>
<project name="MyUtility">
<multiTrigger operator="And">
<triggers>
<!-- the url here will obviously need to change to match your server -->
<projectTrigger serverUri="tcp://server:21234/CruiseManager.rem" project="ProjectLast">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild" />
</projectTrigger>
<filterTrigger startTime="14:00" endTime="18:00">
<trigger type="intervalTrigger" seconds="30" />
<weekDays>
<weekDay>Sunday</weekDay>
</weekDays>
</filterTrigger>
</triggers>
</multiTrigger>
<tasks>
<!-- whatever it is "MyUtility" does goes here -->
</tasks>
</project>
Note here we have moved the decision of the project MyUtility
whether to run or not into the MyUtility
project, rather than in ProjectLast