From: Robert Klemme Date: 2008-12-05T19:21:05+09:00 Subject: Re: Force a program to stop if runtime exceeds given duration 2008/12/4 Aldric Giacomoni <"aldric[remove]"@trevoke.net>: > I don't need atomic precision - I need to stop a task that runs overnight > (being 5 minutes off would not be a problem) so that it's not still running > when a user gets to their machine. If you start your job via crontab another reasonably simple approach would be to store the PID in a file on startup and schedule another script 5 hours later that simply sends a kill -INT (or whatever). The you can handle the signal in your main script and do whatever you need to to to clean up and exit. Kind regards robert -- remember.guy do |as, often| as.you_can - without end