Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2007 14:01:14 +0100
From:      michaelgrunewald@yahoo.fr (=?iso-8859-1?Q?Micha=EBl_Gr=FCnewald?=)
To:        VeeJay <maanjee@gmail.com>
Cc:        FreeBSD-Questions <freebsd-questions@freebsd.org>
Subject:   Re: Help Plz... Cron Job question....hellp...
Message-ID:  <86mytzcuat.fsf@Llea.celt.neu>
In-Reply-To: <2cd0a0da0710310132r32dbb664m7caa540195fff01e@mail.gmail.com> (VeeJay's message of "Wed\, 31 Oct 2007 09\:32\:04 %2B0100")
References:  <2cd0a0da0710310132r32dbb664m7caa540195fff01e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
VeeJay <maanjee@gmail.com> writes:

> Hello Gurus=E2=80=A6.
>
>
>
> I am running a status script written in Perl (*status.pl*) and want to ha=
ve
> it *Always Running*.
>
> How can I check through CRON that "status.pl" is running and if NO, then
> start the script execution again?

Why don't you use the following SH script?

  whule true; do
    perl status.pl
  done

It will restart `status.pl' whenever it dies.
--=20
Best wishes,
Micha=C3=ABl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86mytzcuat.fsf>