is the scheduled script triggered from a robot client or do you use a server-side scheduled script?
In case of the latter, you might consider to increase the frequence of the server-side script.
This is not the same as the user starting the recalc, but the results could be up to date e.g. every 1-2 hours, depending on the time it takes for the server to complete this task. This will work a lot faster then via a client machine.
Test if the server does not slow down too much when this task is performed, and make sure all script steps are compatible with server-side handling. Check the log on FMSAT if i doesn't.
Troi has a plug-in that allows triggering a script on a remote machine. Maybe that would work for you.
I’ve used this for many years, and always found it to be reliable.
Peace, love & brown rice,
FileMaker + Web: Design, Develop & Deploy
Certifications: FileMaker 9, 10 & 11
One Part Harmony
Austin, Texas • USA
Julian Johnson wrote:
I was wondering if it's possible to call a URL on the server that starts the script running so I can trigger it from a button in Filemaker? Ideally, I could do with it working from Filemaker Go & Pro.
If you create an HTTP URL that uses the XML interface to run the script on FMS, you can then use Open URL to fire it. This is tidbit that I picked up from Wim Decorte but I have not yet used it.
Set a server side script to run every 5 (or less ) minutes. That script will check if a flag field is set and if so, run the script and reset the flag.
The user's script will set the flag field. You could include some user interface indicating how long until the updated results are ready.
This sounds perfect, do you have any pointers as to where I could find more info or even an example on where to start with it? If not, don't worry about it.
Julian, the Filemaker guide, "Custom Web Publishing with XML and XSLT", will give you information on the "commands" and grammar that are used by web published FMP XML. While we have been advised that web publishing with XSLT will be deprecated in future version, the XML can still be queried. In fact the PHP API uses XML from FileMaker! (see the "Custom Web Publishing with PHP" guide)
Chapter 5 ("Accessing XML data with the Web Publishing Engine") of the above listed guide should get you started.
BTW, the PHP guide is here: <http://www.filemaker.com/support/product/docs/fms/fms11_cwp_php_en.pdf>
LaRetta's suggestion is excellent. I'd like to add that you can also use a PHP page to trigger a script. You can find the commands to do so in the PHP guide referenced by Beverly.
Option 1: Bot or Server-side script
While the answers above are correct, the question should be where do you wish to script to run. The XML method will trigger the script to run on the server via the Web Publishing engine, which is great if your script can in fact run properly as a web compatible script. The Troi Activator method (and similar plug-ins) will trigger a script on another FileMaker Pro client, so you have access to all script steps, as apposed to being limited to those which run through the Web Publishing engine. The method suggested by David would utilize server-side scripting and would be limited to those compatible script steps. If your process is very invovled, then having a FileMaker Pro client on another machine can give you a means throw more CPU power at the problem. In doing the coding for this type of solution is all about the 'session management'. This method can work great, but it will take some coding and some thought.
We have several dozen clients which are using 'bot-enabled' solutions- both in one and two machine deployments; if you are interested in trying this method, I would be happy to give you a free 30 day trail of a 'bot-enabled' FileMaker Server to do some 'real-world' testing with.
Option 2: Virtual Applications
The purpose to 'offload' complex calcs, sorts, sub-sumamries, etc. to the server is to improve WAN performance, and while server-side script or a bot machine may help; there is a easier way which does not require complex coding and can yeild faster performance. The reason that a FileMaker solution which runs great over the LAN can be slow over a WAN connection is because there is a lot of communication between FileMaker Server and FileMaker (client). Using virtual application technology from Microsoft, 2X, Ericom, and/or Citrix; we can provide a second machine in the datacenter which sit right next to your FileMaker Server, so the performance is 'killer fast'. The we 'stream' the screen changes to the user, so what they see looks exactly like what they are use to. In a complex FileMaker solution the data going back and forth between Server and client far exceeds the data required to redraw the screen, so this can be up to ten times faster. Results will vary due to internet speed, complexity of solution, etc.; but just like my pervious offer, I would be happy to let you test a virtual application (we call vApp) for 30 days without any cost and see what this approach does for your performance. I've never seen your solution, so I can't tell you which of these are the better solution. I have clients which swear by both approaches. It really depends on your specific solution and your needs; but in either case, decisions are much easier after performing 'real-world' tests...
Here's a video which shows what a 'virtual app' looks like...