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

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



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



.



Relevant Pages

  • Re: MFC calling another MFC
    ... because I would close the sub-menu before going back to main GUI, ... to bring up the first app after second app closes. ... First app then launches the second app and goes away and second app launches ...
    (microsoft.public.vc.mfc)
  • Re: Shared memory
    ... >> I am using memory mapped files for cross process communication. ... >> mapped file which is mapped to the swap file by calling ... Problem is the first app is only consuming the data and has no idea how much ... It is the second app that source the data. ...
    (microsoft.public.vb.winapi)
  • Re: Polling Message Queues
    ... as you can use that to read and write to message queues. ... > the message queue for certain messages from the main app. ... > only have the second app able to respond once. ... > the first app as an independent process. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Inserting "triggers" into a vb.net app
    ... the second app could either have data passed from the first app, ... Upon clicking the button I would like to launch another VB.net ...
    (microsoft.public.dotnet.languages.vb)
  • Re: debug an excutale which is launched by another excutable
    ... > In the first win app, I use Process.Startto launch the second one. ... You mean that the second app exits before you can attach to it? ... > Is there any way to set breakpoint in the second app to debug it? ... Debug | Processes to attach to it during this timeout. ...
    (microsoft.public.vsnet.debugging)