On Thursday 23 February 2006 13:17, Anders Johansson wrote:
Anders Johansson wrote:
I know you know this Jerry, but I still have to point this out: this won't run every 15 seconds, it will run at 15 second intervals.
Silly me. Of course the "whatever task" could be launched in the background, which would bring it closer to "every 15 seconds", which might be good enough
But perhaps the way Jerry wrote it would be best.... Since it would allow the program to finish each time. Or... if it is observed that the program takes 3 seconds to run (as an average) then the sleep time could be reduced to 12 secs. and thus if the job took 5 secs. on occasion, no harm would be done. At least that's the way I would do it (not knowing what the OP wants to accomplish)