Start a program N-M times in parallel by running it it each A-B seconds # $Header: /CVSROOT/timestart/DESCRIPTION,v 1.2 2011-10-13 00:14:13 tino Exp $ # # $Log: DESCRIPTION,v $ # Revision 1.2 2011-10-13 00:14:13 tino # Bugfix and minor improvements. Statistics with SIGWINCH added # timestart N M A B program tries to keep N running programs in parallel. The interval between program execution is adjusted accordingly. timestart keeps some bounds, it never executes more than M programs in parallel and the interval is kept between A and B seconds. If the program not returns 0 (or true), the next invocation is delayed B seconds, but this has no influence on the calculated interval. Also following signals are honored: SIGHUP makes the program terminate after all childs are finished; SIGUSR1 halts the spawning of new programs; SIGUSR2 continues and immediately spawns a new program; SIGWINCH print statistics to stderr Note that timestart will run more than M programs if SIGUSR2 is sent more often, as these signals are meant to help in debugging. Signals to parent processes can be sent easily using $PPID, so the child tasks can control timestart a bit. The debug output of timestart is written to FD3 if this FD is redirected somewhere.