What's the easiest way to make a CC.NET local trigger to execute a program?

243 Views Asked by At

When the build fails, I'd like to execute a program that shoots me in the head with this. I've written the program already - I just need it to run when I break the build.

CCTray has the option to make a sound or icon - but not to run a file. Any simple ideas? I'd rather this not be an all day project. :)

3

There are 3 best solutions below

1
On

If you run Outlook, you can set up a rule that runs an application whenever you receive an email saying the build is broken. Just follow the rules wizard and you will find it (in Ootlook 2007 it's on the 3rd page of the wizard, in the select action part).

0
On

Cradiator has functionality to monitor build servers and do stuff when a build breaks. It doesn't have code to run an executable but it would be a cinch to download the code, change it and get what you want. Here's what I think is the quickest path to getting this done:

  • Download the source for Cradiator
  • Edit the DiscJockey.cs class
  • Add 1 line of code that starts your program (line 34) eg:
  • Configure Cradiator to monitor your build server (ie edit app.config and add your url) and run
if (newlyBrokenBuilds.Any())
{ // Add a line of code to start your program here eg
  Process.Start("C:\\myprogram.exe");
}
1
On

CCTray allows you to run commands. In CCTry, go to File | Settings and then click on the Exec tab.