Re: What to do when disaster strikes but requires user input
- From: Steve Meyerson <stevemeyerson@xxxxxxx>
- Date: Sat, 30 May 2009 10:05:57 -0400
Jeff,
I have a less elaborate idea (unless I'm misunderstanding your task)
to detect first app's failure. Why not have the first app on startup
create and use exclusively a file in a known location - or at least
lock an unused or dummy record in some other file that's always open.
Have the 2nd app continually attempt to lock the record (or file). If
it succeeds, the first app may have shut down. Then send your email or
whatever.
Also in the first app, trap the error(s) you want reported and unlock
the file/record in your error-trap's method before displaying the
messagebox to the user.
Steve
On Fri, 29 May 2009 14:46:21 -0400, "Jeff Grippe" <jeff@xxxxxxxxx>
wrote:
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: Re: What to do when disaster strikes but requires user input
- Next by Date: Re: Preventing Tight Loops
- Previous by thread: Re: What to do when disaster strikes but requires user input
- Next by thread: RE: What to do when disaster strikes but requires user input
- Index(es):
Relevant Pages
|