t-rex has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
In my script i give user a parameter where he mentions he wants to run this script for x number of hours, how should i implement this? I read online , one way could be using SIGALRM and writing handler for this so that when this is achieved I stop the script,
please suggest other efficient ways if there exist, thanks
P.S. : basically The script involves lot of forking, file transfers , socket connection, and we want to setup a cron job which runs everyday for 10 hours ( our script runs a tool which does regression), so I have an option to run the tool for some million passes or for lets say 10 hours. I hope I am clear now
thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl script to run for x hours
by haukex (Archbishop) on Sep 27, 2016 at 10:49 UTC | |
by t-rex (Scribe) on Sep 28, 2016 at 17:03 UTC | |
by haukex (Archbishop) on Sep 29, 2016 at 12:17 UTC | |
Re: Perl script to run for x hours
by stevieb (Canon) on Sep 27, 2016 at 13:52 UTC | |
Re: Perl script to run for x hours
by Happy-the-monk (Canon) on Sep 27, 2016 at 13:31 UTC | |
Re: Perl script to run for x hours
by marinersk (Priest) on Sep 28, 2016 at 02:45 UTC |