I can't explain it b/c I haven't used it.
But here's some notes that may help.
Code:
...
#launching your program:
myprog&
#getting its id
id=$!
#killing it whenever you want
kill $id
...
#sleep for xx and restart script
do_stuff &
pid=$?
sleep xx
kill $pid
wait $pid
NOTE: These are 2 separate snippets.
David the H: should be along any minute...