[CentOS] Timeout for a script

Jussi Hirvi greenspot at greenspot.fi
Wed Nov 12 09:54:07 UTC 2008


How could I make a script time out after nn minutes, if it's not finished by
then?

The practical context: I have a dozen or so of backup scripts in a directory
"daily", and they are run by cron like this:
> 0 23 * * 1-6 run-parts /root/daily

Sometimes one of the scripts hang, in which case the rest of the scripts are
delayed more than can be allowed.

- Jussi

--
Jussi Hirvi * Green Spot

NOTICE: Due to the rising energy costs, as well as current market
conditions, the Light at the End of the Tunnel has been turned off. We
apologise for the inconvenience.



More information about the CentOS mailing list