Re: What to do when disaster strikes but requires user input
- From: "tom knauf" <hbgmail@xxxxxxxxxx>
- Date: Thu, 4 Jun 2009 15:03:16 +0200
Hi,
we do this with a timer in the first app (worker) which writes a timestamp
into a flagfile every 2 minutes
the second app (oberver) checks this file, if it does not exist or the entry
is older then 5 minutes it restarts the pc (not only the worker, because
there can be network errors,...)
and sends an email to the admin. And yes, we handle daylight change.
The observer writes a flagfile like that, too and a second pc in the net
checks the observer in the same way.
Works fine since some years.
We tried some tools which makes a service from an exe or start an exe as a
service and some add. tools to watch and restart them.
The advantage is, that for a service no user has to be logged in, the
disadvantage is, that it did not work :-)
HTH
Tom
"Jeff Grippe" <jeff@xxxxxxxxx> schrieb im Newsbeitrag
news:Xs-dnfWUidPgsL3XnZ2dnUVZ_judnZ2d@xxxxxxxxxxxxxxxx
Hi All, Thanks for the help.
I have an App that needs to remain up and running at all times. To
facilitate this, I wrote another App which makes sure that the first App
is running. When it fails, the second App restarts the first App and sends
me an email so that I know to check for problems.
The issue that I have is that sometimes the failure is a type that
requires a UI event before death. When that happens, the second App thinks
that the first App is still running and so it does nothing.
The only thing I can think of to do (which I've done in other languages in
the past) is I can update a record in a table with a datetime value
periodically, say every 30 minutes. My watching app can check this table
and if more than 40 minutes have passed since the last datetime value
update, kill the process and restart the app.
Can anyone think of anything simpler?
Thanks,
Jeff
.
- References:
- What to do when disaster strikes but requires user input
- From: Jeff Grippe
- What to do when disaster strikes but requires user input
- Prev by Date: com question
- Next by Date: Re: This Newsgroup - Is This the most popular for VFP
- Previous by thread: Re: What to do when disaster strikes but requires user input
- Next by thread: Re: VFP source code for calculator?
- Index(es):
Relevant Pages
|