Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Process Reliablityby dempa (Friar) |
on Jul 20, 2000 at 15:04 UTC ( [id://23344]=note: print w/replies, xml ) | Need Help?? |
One alternative could be to use cron. That is if you're
on a Unix system. NT has some sort of cron facility too,
but since I'm not familiar with it, I won't speculate
in it's use.
Anyway, you could modify your script so that it saves it's own PID in a file. (You can get the PID from the special variable $$). Then have your new script (executed from cron every 5 minutes or so) look in that file and then check if that PID is active. If the PID is running, be sure to check the args too, so it's really your script that has that PID. This would be really easy in Unix. I guess it could be done in NT too? I'll let someone else answer that...
In Section
Seekers of Perl Wisdom
|
|