Re: What to do when disaster strikes but requires user input

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • RE: App display different on PCs other than development PC
    ... I have just installed my first app on another machine and found exactly the ... When I install it anywhere else, though, the font appears smaller, ...
    (microsoft.public.dotnet.general)
  • Re: autonomous windows
    ... second form is shown in the lower right-hand corner; ... mail' popups in outlook and other similar apps). ... Have a hidden text box on the main app and add its handle to the command ... the second app can SendMessage to the text box in the first app to fire the ...
    (microsoft.public.vb.general.discussion)
  • Re: What to do when disaster strikes but requires user input
    ... the second app checks this file, if it does not exist or the entry ... I wrote another App which makes sure that the first App ... the second App restarts the first App and sends ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Re-entrancy???
    ... Create an application that has two loops, one that calls DoEvents in it the other not. ... If you run the first app without the DoEvents, the second app will take longer to complete on a single processor machine, then if you run the first app with DoEvents. ...
    (microsoft.public.vb.general.discussion)
  • What to do when disaster strikes but requires user input
    ... I have an App that needs to remain up and running at all times. ... the second App restarts the first App and sends me ... if more than 40 minutes have passed since the last datetime value update, ...
    (microsoft.public.fox.programmer.exchange)