views:

263

answers:

2

"New Build Definition" in Team Explorer doesn't allow you to force a build to run more frequently than once every 24 hours. Is this possible?

I want the tests to run every hour regardless of whether any changes have been checked in.

I think this is possible by creating a scheduled task but I'd rather keep the solution in TFS if possible.

Thanks, Chris

+1  A: 

"I want the tests to run every hour regardless of whether any changes have been checked in." - Why? What would this achieve? If nothing has changed, then it is pointless rebuilding.

Suggest you set up to queue a build on checkin.

Mitch Wheat
The solution that is to be built on the hour contains web tests (MSTest / webaii) which launch a browser to determine if an environment is available or not.The environment availability can change for reasons other than source code modification, so this test needs to be performed regardless of checkins.
da_ponc
why not write a windows service scheduled to check every hour, that checks the whether environment is available or not, sending an email on unavailable. That makes more sense than compiling all your code...
Mitch Wheat
I think it'd be better in TFS since everyone can view/queue the builds there as well as see the build/test results. Also, notifications are built into TFS for the build failures. All in all, it would be better transparency than a windows service.The build project can be modified so that it doesn't compile the code unless there are checkins.Cheers
da_ponc
You're really combining two very different things. Web / unit tests exist to verify that the code works. Whether the site is up or not is an Infrastructure (not development) task and web tests should be used to check that.
Chris Lively
Totally agree with @Chris Lively.
Mitch Wheat
A: 

Thanks for your suggestions.

I achieved what I was after by running the following command in a scheduled task:

TFSBuild start <<TeamFoundationServer>> <<TeamProject>>
 <<BuildTypeName>>

Reference: http://msdn.microsoft.com/en-us/library/bb668975.aspx

Cheers, Chris

da_ponc