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

  • From: Baskar K <baskar910@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Mon, 25 Jul 2016 10:44:43 +0530

Hi,
May be you can use LSM http://lsm.foobar.fi/
LSM can be used to detect the internet connectivity status
Thanks
baskar

On Mon, Jul 25, 2016 at 8:57 AM, Shrinivasan T <tshrinivasan@xxxxxxxxx>
wrote:

I have a perl script in a desktop which is doing web scrawling
continuously.
when the internet connection goes down sometimes, the script tries for 5
min. Then it dies.

I want the script to run again once the internet is connected,

How can we achieve this?

Thinking on writing a python script to do the following.

1. Check if the perl script is running.
2. Check if internet is working
3. if both script and internet are working, do nothing.
4. if internet is not there, kill the perl script
5. keep on looking for internet
6. once the internet is rady, start the perl script.

Have to run this script in cron for every two min.

I think there will be better ways to achieve this.

Please share your thoughts.

Thanks.


--
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get Free Tamil Ebooks for Android, iOS, Kindle, Computer :
http://FreeTamilEbooks.com


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




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

Other related posts: