Try the alarm function.

Tor.

Darren Edgerton wrote:
> 
> Hi,
> 
> i want to set a timer around a system command, so that IF the command runs
> longer than x seconds
> send email to the sysadmin
> Note: i *DO NOT* want to kill the process - simply want to send a warning
> that it is taking longer
> than expected
> ie
> 
> $maxtime=60;        # 60 seconds
> system("some_command_that_takes_longer_than_60secs");
> 
> # if running longer than $maxtime
> &call_sub_to_send_email;
> 
> i have had a look at 'perldoc -f alarm' but cant see how to adapt this to my
> requirement
> 
> all help appreciated
> 
> regards
>      Darren Edgerton
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to