Can I have Hudson built once in a single day? (but not at a specific time)

At the moment I'm using the Hudson CI to build a medium sized project every 5 minutes on SCM change. I'd like to push the use of it out a bit further, and get it doing proper daily/nightly builds (at the moment the CI isn't doing anything with the products, its there for unit testing only)

However, the problem is the CI server isn't run on a dedicated box - it's actually a machine that's up for most of the day, but does eventually turn off (it isn't on for a predictable start->end time span either)

So I would just stick @daily into Hudson, but from what I can tell, this builds at midnight, when there's a very high chance the machine won't even be on.

Is there any way I can get hudson to perform a single build every day, but not at a specific time? e.g. Can I somehow trigger it as soon as hudson starts, or something along those lines?


You can use the CLI plugin to externally control the Hudson process.

You can then script whatever you need around it, like putting it in a "run every hour" cron script in where you keep track of the last invocation of the build, so you can determine when you want to launch the build again.