Hi everyone!

I've been using CC.NET for a month or so now for an automated build process
at my company and it's running quite well.  But we've been running into
this problem where our VSS server is being backed up at a certain time of
day, everyday.  We basically need the pause ability that Java's
CruiseControl has.  So, I have added the source to version 0.6 and it seems
to be working nicely for me so far.  Attached are all the files I
made/changed.

What I've done is create an interface in
ThoughtWorks.CruiseControl.Core.Schedules called IPauseSchedule.  The
interface has one method: IsPaused(now: DateTime): bool.  There is one
implementing class in the same package called PauseSchedule.  I had some
trouble with getting the config XML to work the way I wanted, so I
eventually ended up with the following format:

<schedule type="schedule" sleepSeconds="30">
    <pauseschedule>
        <pause startTime="0000" endTime="1617" day="monday" />
        <pause startTime="1618" endTime="2359" day="tuesday" />
        <pause startTime="0200" endTime="0300" />
    </pauseschedule>
</schedule>

Just like in the Java version, startTime and endTime are in "HHmm" format
and day is the full name of the day of the week.  The day attribute is also
optional.  If it is not specified, it just assumes to work on every day of
the week.

I edited the following files:
    core\schedule\Schedule.cs
    core\configuration\ccnet.xsd

I added the following files:
    core\schedule\IParseSchedule.cs
    core\schedule\ParseSchedule.cs

Please note that althought I did update the schema, I am a little green
with XML schema, so it may not be correct.  I used XMLSpy to do my editing.

I hope this is useful to other people and I would be delighted if it gets
added to a later release.  I also realize that there has been no error
testing on my part and my arrangement may not be ideal, so please send me
any critiques so that any future enhancements I write for CC.NET can be
better.

(See attached file: Schedule.cs)(See attached file: PauseSchedule.cs)(See
attached file: IPauseSchedule.cs)(See attached file: ccnet.xsd)

Dustin Metzgar

Attachment: Schedule.cs
Description: Binary data

Attachment: PauseSchedule.cs
Description: Binary data

Attachment: IPauseSchedule.cs
Description: Binary data

Attachment: ccnet.xsd
Description: Binary data

Reply via email to