Re: Help with Cron pleazzzzzzzzzzzz



-----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-----
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: ps: warning: /var/run/dev.db: No such file or directory
    ... > I've since noticed that cron didn't restart, which is odd, but fixable, ... I wound up rebooting the server, and it looks like as if /etc/rc bombs ... None of the additional daemons are started: cron, ... Commercial OS breeds commerce, whereas free OS breeds freedom, ...
    (freebsd-questions)
  • Re: "watchdog" for a process?
    ... sktsee wrote: ... Cron, that will look at the process list and if a process has been ... killed or had died will restart the process? ... the listing will give some results. ...
    (Ubuntu)
  • Re: crontab
    ... > - did u restart the cron deamon after you made changes to the crontab? ... You don't need to restart the cron daemon ... Manuel Arostegui Ramirez #Linux Registered User 295750 ...
    (RedHat)
  • Summary: Tru64 [v4.0G]: cron and "Max job limit"
    ... Any changes will take effect after a restart of cron ... you may not actually want to have more than 25 jobs ... Solving the problem with this job also solved the error condition for my ... > A restart of cron seem to have killed jobs in queue/not finished. ...
    (Tru64-UNIX-Managers)
  • Re: "watchdog" for a process?
    ... Cron, that will look at the process list and if a process has been ... killed or had died will restart the process? ... ps-watcher seems to fit your criteria. ...
    (Ubuntu)