Neil wrote, on 22nd May 2012 04:18 UTC + 1 :
> I need to run a process using a timer. The process needs to be running all
> day long. We are looking for a way to ensure that the program is running,
> and, if not, then relaunch it.
Hello,
Perhaps it would help to precise what you call "the" program.
If you mean ensuring the main database is running, perhaps the calling
procedure could simply have an error handling ?
Or perhaps you meant that the client not running is a problem.
In this case, probably it is more simple to separate the question of the
main database, and simply verify that the client is running.
The APIs can let you see the name of the process, but probably not
ensure that it runs properly. You can imagine it writing the time
periodically in a log. An outside program can periodically control the
time that is written in the log. If that time is too old, the client is
supposed to be looping (endless - you would say looping over ?), and it
seems a good idea to kill the process and relaunch the program. Message
queues are an elegant way for such a link, but it is not quite sure it
is adapted on Access, or even on all system. So, the traditional log
file can do it. Do not forget to purge it from time to time.
And in case of a problem with the main database, what do you think of my
first paragraph ?