Date: Wed, 31 Oct 2007 08:39:13 -0400 From: "Andy Harrison" <aharrison@gmail.com> To: FreeBSD-Questions <freebsd-questions@freebsd.org> Subject: Re: Help with Cron pleazzzzzzzzzzzz Message-ID: <a22ff2940710310539x29957b56g9a0af214476cf8df@mail.gmail.com> In-Reply-To: <2cd0a0da0710310458t49610b34h9b19366c3765fe0@mail.gmail.com> References: <2cd0a0da0710310458t49610b34h9b19366c3765fe0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/31/07, VeeJay wrote: > I am running a status script written in Perl (*status.pl*) and want to have > it *Always Running*. > > > > How can I check through CRON that "status.pl" is running and if NO, then > start the script execution again? > Run monit. http://www.freshports.org/sysutils/monit/ Here's an example config for making sure sshd is running: $ cat /etc/monit.d/sshd check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/sshd start" stop program "/etc/init.d/sshd stop" if failed port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout - -- Andy Harrison public key: 0x67518262 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFHKHeKNTm8fWdRgmIRAoZGAJ0ZJCzDedOEzVqJFYlniZshPKJmPwCaA8Uh pPYRFCDdrIk1YgYPcyH0hew= =dr1X -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a22ff2940710310539x29957b56g9a0af214476cf8df>