Detecting filemaker is down and relaunching it

Hi ppl.

I’m running into a little problem with a filemaker server 5.5. Nobody I talked to or wrote to knew what is the problem with it. My guess is that it makes a “time-out” because of no requests sent to it, but then again it has crashed when there were requests…

Beeing so, I’m trying to create an applescript that is activated from time to time with the cron scheduler, so that I can check if the program is running… if it detects that the program is not running, then it would activate it.

I’ve tried:

if application “ABC” is not up then
tell application “ABC” to activate
end if

but the up or down instructions don’t work. I’ve guessed them, by the way. I don’t know if they are supposed to work… :slight_smile:

Anyone?
J

Hi :slight_smile:

You do not need really to know if the application is launched,
because with this simple instruction:

tell application “FileMaker Pro” to activate

normally the application is activated if it were already launched,
or, the contrary case, it launched and is activated automatically.

:wink:

Hmm. If FileMaker Server is crashing on you, you’ve got a bigger problem than just relaunching it. When FileMaker databases close incorrectly (when crashed, etc), they can get corrupted. Sometimes that corruptiong is not immediately visible, but causes future crashes. Every time you just re-open crashed files (and see the “Consistency Check” message), you could be adding corruption to files. Unfortunately, it may be too late to go to a good backup copy of the files, and just import your data.

Oh, if you are running File Sharing on the same machine as FM Server, TURN IT OFF! That can be one major cause of crashing FM Server, and may allow people to modify served files directly, which can also damage them.

There’s a great forums site for FileMaker at http://www.fmforums.com/, and FileMaker.com has a bunch of resources in their Knowledge Base. You can also do a Google search to find out more about good practices in using FM Server.

Once you’ve got corrupted files, it can be very hard to get back to a stable system - trust me, I’ve got clients whose files were damaged before they worked with us, and it’s not easy to fix. If you don’t have too many files, you may want to send them to FileMaker Inc for repair ($100 per file). They have recovery tools that are not available to the end user, as they involve the person using them to understand the whoel database format.

Here is a basic Checking script that I use:


set restartMyApp to application "insert application name"
tell application "System Events"
	if the name of every process does not contain "insert application name" then restartMyApp
end tell

If you add on idle commands the script can be permantly running.

HTH
Ben.