At work, I use Linux for building our software package. Most of the time we will give build just before lunch, so that during the lunch break build will be done. And we, the lazy developers wait till the last minute to commit.. so people will be waiting for us to commit, so that they can start the build before lunch.. I got this idea today, so that we need not wait till everybody completes. We just delay the launch of the build by say 15 minutes so that you can execute the command and go for your lunch.. the lazy developer will commit in the meantime and the build kick starts without your presence..
Just 2 lines.. see below:
echo "Waiting for $1 seconds to launch $2"
sleep $1
$2
I saved the script as defer and put it in the /usr/local/bin directory. I did chmod to make the file executable.. so if i need to defer my build for 15 minute == 900 seconds
so my command will be:
defer 900 "make mytool"
there you go.. after 15 minutes your make will start... hurray!!
A realllly simple, handy script...
Showing posts with label delay. Show all posts
Showing posts with label delay. Show all posts
Monday, January 12, 2009
Subscribe to:
Posts (Atom)