MacOS – Monitor and automatically restart a process

filemakermacos

I have a Mac Pro running OS X 10.9 with FileMaker Server (FMS) installed. One of the processes running is fmsased (script execution daemon). Periodically this crashes and I have to log into and restart it from the command line (fmsadmin restart fmse -y).

Is there a way of monitoring that process and if it fails automatically issuing the command line instruction?

I've looked at Lingon but couldn't figure out how to do this with it.

Thanks in advance.

Best Answer

Lingon is a GUI to launchd command line utility that manages OS X processes that run in the background.

Basically, to have launchd manage your FileMaker server, all you need to do is to create a special XML file called a property list (.plist) and place it an appropriate place.

Here is a nice (and easy) explanation of how it works and how to configure it.