Making a persistent daemon?

Hey there list-
     I've written a small ruby script that runs on a colocated server. Every 20 minutes this program will ping our in house server and pull the headers and top of the index page on our website. If these tests fail I send emails and text messages to a few people. Just a basic monitoring app. My question is what is the best way of making this monitor a persistant daemon that will respawn if it quits for any reason. Sould I just use a cron job? Even if a cron job is best for this app I would still like to know the preferred way of making a persistant ruby daemon.
      Thanks in advanced for your responses.

-Ezra

Process control is best handled by something specialised for the
job, such as runlevels, cron or inetd. Cron is definitely the answer
in this case. Anything you could write in ruby would just be
reinventing the wheel.

···

On 4/14/05, Ezra Zygmuntowicz <ezra@yakima-herald.com> wrote:

Hey there list-
     I've written a small ruby script that runs on a colocated
server. Every 20 minutes this program will ping our in house server
and pull the headers and top of the index page on our website. If
these tests fail I send emails and text messages to a few people.
Just a basic monitoring app. My question is what is the best way of
making this monitor a persistant daemon that will respawn if it quits
for any reason. Sould I just use a cron job? Even if a cron job is
best for this app I would still like to know the preferred way of
making a persistant ruby daemon.
      Thanks in advanced for your responses.

--
spooq

     I've written a small ruby script that runs on a colocated
server. Every 20 minutes this program will ping our in house server
and pull the headers and top of the index page on our website. If
these tests fail I send emails and text messages to a few people.
Just a basic monitoring app. My question is what is the best way of
making this monitor a persistant daemon that will respawn if it quits
for any reason. Sould I just use a cron job? Even if a cron job is
best for this app I would still like to know the preferred way of
making a persistant ruby daemon.

Maybe of use?
http://groups-beta.google.com/group/comp.lang.ruby/msg/52d1b0d714c965f3

Regards,

Bill

···

From: "Ezra Zygmuntowicz" <ezra@yakima-herald.com>