tags:

views:

58

answers:

2

Does anybody know how to set the build time on NANT project script? Actually I want NANT to run the project at some specific time like every night at 8pm(Nightly Build). How can I set this time?

+2  A: 

Set up the nant command to run as a scheduled task* under the control panel.

*Or a cron job if you're using Mono.

Dan Monego
Or use a build server running CruiseControl.NET (or some other build running tool) to make things easier when you have more than one machine or more than one project.
OregonGhost
A: 

Add this into your ccnet.config file to have CruiseControl .net run your build project at given day.time:

<scheduleTrigger time="23:30" buildCondition="ForceBuild">
     <weekDays>
        <weekDay>Monday</weekDay>
        <weekDay>Tuesday</weekDay>
        <weekDay>Wednesday</weekDay>
        <weekDay>Thursday</weekDay>
        <weekDay>Friday</weekDay>
        <weekDay>Saturday</weekDay>
    </weekDays>
</scheduleTrigger>

As the code suggests, this will force the build event to take place Mon-Sat after 23:30 each day.

Any good?

Brett Rigby