good chemistry is complicated,
and a little bit messy -LW
Exec'd perl running wild on cpu-timeby jeroenes (Priest)
|on Nov 13, 2000 at 17:56 UTC||Need Help??|
jeroenes has asked for the
wisdom of the Perl Monks concerning the following question:
As a humble novice, I would like to ask some advice about a perl-script which I run in background mode. Actually, it is more a How-Do-I-Run-This question than a perl-coding question, methink. Let's first start with a short description of the script.
The script wakes up (should wake up) every 5 minutes, go and retrieve traffic-jam info from a dutch site, log it, and when the time is right, it should report this info in an e-mail to my wife, who uses this info to determine the time of her homily return. As you can imagine, this script really is a part of our married life ;-).
The main loop is as follows:
and I use IO::Socket to retrieve the web-page. The script runs just fine, but after a couple of days it starts to eat CPU time so I have to kill the process.
Normally I ran it with exec get_files.pl files & , after which I killed the terminal. But lately I discovered that if I leave the terminal open, the script keeps running without a problem. At the moment it has been running for one week without a problem.
It runs, my wife is happy, and so am I. But, I still don't know why the script goes mad when I close the terminal. Is there a reason? Am I doing something wrong? I'm very curious about this.
If your (our?) great society of monks could come up with an answer, a humble novice would be made very happy.
May the Perl be with you,
PS: If any ofyou happen to live in Holland, and are interested in the script itself, don't hesitate to contact me.