Mr. Bungle Posted January 23, 2008 Share Posted January 23, 2008 I needed to execute a script in an FMP7 database that displays information to the web running on Mac OSX (10.3). This database has to be updated from another database running on FileMaker Server on at least a daily basis, so I wrote a script to handle the records deletion / import records steps. This worked fine, but I wanted to find a way to automate the process because- 1) I knew it could be done and 2) in case I was out of the office, the process still needed to happen. The answer for me was a combination of Cronnix and AppleScript. Cronnix is a free app that supplies a GUI front end to the UNIX crontab. Crontab specifies the time that the AppleScript executes the FileMaker script. Download Cronnix here: http://snipurl.com/1y2l4 The AppleScript looks like this: ********************************************* tell application "FileMaker Developer" activate tell database "MyFMWebFile" do script "Import Records" end tell end tell ********************************************* In the above AppleScript example, change "MyWebFile" to whatever your FileMaker Pro filename is. Also adjust the first line if your application is not FileMaker Developer. In AppleScript, I saved the file as an application, copied it to the computer serving the FMP database to the web and configured Cronnix to run the AppleScript application created from the script shown above. Now my database updates once per hour with no intervention required from me. I offer this to all the users here that may be trying to accomplish the same thing. I looked at various solutions (FileMaker plug-ins, etc...) but I'm cheap (no... FRUGAL!) and I knew there had to be a no or low-cost solution to my problem. Hopefully this will be of some use to others here. Quote Link to comment Share on other sites More sharing options...
sjuul Posted January 24, 2008 Share Posted January 24, 2008 What I do these days, is creating a new FileMaker document, that triggers the remote script on opening. It's more solid that basic AppleScripting. Quote Link to comment Share on other sites More sharing options...
Mr. Bungle Posted January 25, 2008 Author Share Posted January 25, 2008 That's fine, as long as you intend to open the file every day. The one I'm referring to serves information to the web, so it's open ALL the time- never closes. My point was to show a method of triggering a script at specified times to import new information to be shared on the web. Quote Link to comment Share on other sites More sharing options...
mfif Posted January 25, 2008 Share Posted January 25, 2008 I *think* ZippScript will let you do that, but don't take my word for it... Quote Link to comment Share on other sites More sharing options...
Mr. Bungle Posted January 28, 2008 Author Share Posted January 28, 2008 Yeah, you're right. Zippscript does exactly that. I looked into it and decided that for my particular application, Cronnix & Applescript was the easier solution. Plus, if I need to change the times the script is triggered, I just fire up Cronnix, change the times and I'm done. No mucking around in ScriptMaker, adjusting the time there. Plus, I got to learn a little more about Applescript! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.