1 Reply Latest reply on Sep 19, 2014 5:28 AM by mikebeargie

    Keeping a database open


      What are some techniques people use to keep a solution running?


      I'm exploring ways to keep a robot alive through system restarts, server disconnections, and general errors… anything that would disconnect the file, close the file, present a dialog box, or otherwise stop the bot from running.


      I can start up FileMaker Pro headless easily enough (on Windows) using AlwaysUp to run FileMaker Pro as a Windows Service. I tell AlwaysUp to start "C:Program Files (x86)FileMakerFileMaker Pro.exe" and to provide an "fmp://server.hostname/Solution.fmp12?Script" URL as an argument, and this starts up FileMaker Pro and launches the solution nicely.


      The trouble is, any number of things can happen to the solution that might present a dialog window — server disconnection, for example — that won't cause FileMaker Pro to exit, and so AlwaysUp won't know to kill and restart it.


      I've considered a couple of approaches. One would be to somehow force FileMaker Pro to die any time the solution stops working. Another would be to monitor the UI windows using something like AutoIT scripts, but I'm having mixed results there. It seems like there might or might not be some way to do some of this from within a FileMaker script, but I'm unsure whether I could rely on a script if there's a dialog window open blocking interaction, like if somehow a File Open dialog were to appear.


      I've done some searching on this and other forums, though I'm not sure I'm thinking of the right things to search on.


      Are there any common methods for keeping a solution up and running that I should know about?



        • 1. Re: Keeping a database open

          Just a word of warning if you start diving into force quits and such, you run the risk of corrupting your file.


          I created an alert system once by having a robot run an OnTimer script that writes a ping record to the server every five minutes or so. Then the server runs a scheduled script to check for the ping record. If the server finds missing ping records, it sends an alert out via email to check the robot.