[ILUGC] Re: How to restart a perl script if it is stopped?

  • From: Bharathi Subramanian <bharathi.s@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Wed, 27 Jul 2016 12:53:55 +0800

Hi, Write a wrapper script, which check for Internet connection, start the
Perl Script and put the Process
info (Name, PID) in a lock file. The Perl script can also put the retry
count and last success time in a file.
In the CRON, your monitor script need to check all this info and decide
whether to restart or let it run.
By this way, the original script need not be complicated with other
logics.

_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: