in reply to Re: Perl script to run for x hours
in thread Perl script to run for x hours

hello,

yes its doing heavy processing , sockets,file transfers, running some tools

Replies are listed 'Best First'.
Re^3: Perl script to run for x hours
by haukex (Archbishop) on Sep 29, 2016 at 12:17 UTC

    Hi t-rex,

    For things under your control (calculations, reading a file), you can implement the timeout yourself (e.g. marinersk gave a basic example). For network communication, you can usually specify timeouts after which the control will return to your script, at which point you can do your own timeout checks. For external processes, it really depends on the external process. You'll have to be a lot more specific in your question, otherwise the best we can do is general suggestions. I know what I mean. Why don't you? and How do I post a question effectively?

    Regards,
    -- Hauke D