views:

68

answers:

3

Weird question, perhaps. We have a number of simple utilities written in-house that need to be run on an automated basis. These are not build jobs. Just things like running SendOutHourlyEmailAlarms.exe, KeepFoldersInSynch.exe and such. I would normally set these things up as simple scheduled tasks/AT commands (or a Windows Service if more granular control is needed over the scheduling), but a co-worker has set up a number of these tasks as build projects on the CruiseControl.NET server. I asked him why he set these up this way and his response was that the executions (and their logs, return values, thrown exceptions) were all tracked and logged and that this information was accessible through an organized interface on the build server website. I couldn't argue with this.

But this just has a smell that I can't quite identify. Is this a proper use of CruiseControl.NET? If not, what are the dangers? Even if it may fit the bill, aren't there other products better suited for this type of thing?

+6  A: 

We have all sorts of non-build related tasks for the exact same reason as your coworker had, I want one spot to look up any and all jobs I need run.

Some Examples of our CC.NET projects:

  • FTP installers to Remote QA

  • Creating Source Code Documentation

  • Create VM's with the installers installed for QA in the morning

  • Archiving Installers

Pretty much anything I have to do by hand more than once, becomes a project. IMHO it is much better than a scheduled task for one other reason as well. Our config files are in source control, so we have 1 place to make adjustments. We do not have to log into multiple servers and make adjustments or wonder which server did that.

Alex
If the actual execution of one of these tasks needs to be on a different box than the build server (e.g. bulk-loading on a database server, running on the only machine with specific drivers, etc.), is there an elegant solution there? Or is this only for executables that can be run directly on the build box?
Chris Simmons
We do exactly this with Bamboo and Remote agents. It works really well.
leonm
We have dozens of servers, usually these types of things are done on non-build servers. Your web dashboard can point at many servers, so it doesn't matter.
Alex
"Your web dashboard can point at many servers" - Brilliant! I guess I need to get better acquainted with CC then. Thanks for the help.
Chris Simmons
+1  A: 

Just because a tool is designed to solve a particular problem does not mean that it will not have equal facility at solving similar problems outside the scope originally concieved by the tool creator. If CruiseControl.NET solves these problems well, then it is absolutely the appropriate tool to use.

jball
+2  A: 

I think your coworker has made a good argument. If these tasks are related to the development process, then placing them in CruesControl.Net as a project seems acceptable. I would draw the line at utilizing a development server to run production processes though. Although it is true that "If the only tool you have is a hammer, you tend to see every problem as a nail," it doesn't mean that the hammer isn't capable of solving a lot of problems!

pdavis
I think the build server/production process angle was what struck me as a "smell".
Chris Simmons