Hey daveealex --
I just posted a reply to Mick Lockyer's request for Script Triggering. I suggested he use some automated server side script scheduling. This will definitely work for printing your reports at 7:30 each day. Check it out:
Thanks for the answer shudder, but printing is not possible from the server according to the campatibility list. Is there some other way to do this that I am missing?
Ack. No. I'm a bit stumped. Sorry -- I failed to look at the print step under compatibility for server side script runs.
I was thinking you might be able to call a sub-script that prints from the server side script run, but I don't think that will work either: the steps in any sub-script also must be compatible, and of course printing is not. Hmmm.
Anyone else handled something like this? Perhaps finagling a way with the OnTimer script will be the best way to handle.
Sorry I can't help any more (I thought for sure this would help you!! -- my bad).
thanks for the thought shudder, I am sure the ontimer script will work, but this means i have to leave a fmp open when i leave work and reset it everyday. There has to be something else. Anybody?
You can use a robot file to perform scripts that are not server schedule compatible.
Define a script in your current file that will print your report the way you want it printed.
Create a new FileMaker file with no tables and just one script. If your current file is password protected, define a matching account and password in this file (you can use a very low level account for this to keep your database secure) And set it in File Options to open itself with this password automatically.
Your script would look something like this:
Perform Script [//reference the hosted file and the report script here]
Exit Application //if you want FileMaker to always shut down
Close File //If you just want the robot file to close, but leave fileMaker running
In FileOptions, set your script to run when the file is opened.
Use the operating system to open this robot file at the scheduled time. On windows systems, windows task manager can be set to "run" the robot file at a scheduled time. There is a mac equivalent to this, but I don't have a Mac. I think there's something called Cronos that can do this if memory serves correct here.
Caution: Be real careful of any chance of an Infinite loop in your sheduled script. If a script get's trapped in an infinite loop and your robot file is closed, the only way to escape the loop is to use the server console to close and re-open the file.
Thanks Phil it works perfectly!!