Auto-restart Access app

B

Brian

I have an Access app that runs unattended on a server (in an RDP session) and
stops occasionally for some unknown reason. I have complete error-trapping
with e-mail notification of any trappable error, and I do not get notified in
this situation (I do get notificaitons of other erros). I just reconnect to
the server and discover that the program is no longer running.

For whatever reason, the error that is causing this is not trappable. I
cannot get the program to fail after I reconnect, so I cannot duplicate the
problem.

Rather than spending a lot of time writing a logging routine to pin down the
issue, the quick solution may just be to use the Task Scheduler to ensure it
starts if stopped.

What is the easiest way to avoid duplicate open copies of the app running
when using the Task Scheduler like this?

I think if I capture the process ID of the main app upon opening the main
app, place it in a text file, and have the other app check to see if that
process is currently running, I can ensure that the program restarts without
ending up with duplicate copies running.

Maybe I am missing something in the Task Scheduler here. If the Task
Scheduler just had a "don't start if the task is already running" option, I
might be fine, but I do not think that exists, and I cannot kill the program
each time the task fires because sometimes the program takes two minutes to
run its processes, and other times it takes 20 minutes. Also, the first
instance of hte program would always be started manually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top