[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: making a persistent daemon?

Ezra Zygmuntowicz

4/14/2005 2:30:00 AM

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


2 Answers

Luke Graham

4/14/2005 2:53:00 AM

0

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.

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.

--
spooq



Bill Kelly

4/14/2005 3:17:00 AM

0

From: "Ezra Zygmuntowicz" <ezra@yakima-herald.com>
>
> 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/52d1b0...


Regards,

Bill