One way to "pause" without using Pause/Resume:
# approximate 5 sec pause
Set Variable [$Time ; Get ( CurrentTime ) + 5]
Exit Loop if [Get ( CurrentTime ) > $Time]
There are also ways to use the OS to schedule the launch of a "robot file" that performs a script when the robot file is opened. Since this file opens as a client of the server, Server Scheduler limitaions do not apply.
Thanks for your pause workaround PhilModJunk
I don't understand what you mean by 'robot file' that performs a script. Do you mean a shell script or a filemaker script - and launched from where, doing what ?
Also, if I remove the pause step to the script mentioned in my post, it still doesn't work when launched from FMS' scheduler, there is this 'error 110'. Is it because testing the content of a webviewer is a layout type function and the server can't really do that without a client open ???
I would not be suprised to hear that you are correct with regards to this function being incompatible with a server scheduled script, but there's no indication in FileMaker help that it is so we can only speculate.
Here's an example of a robot file we use to run a script once a night that includes Import Records steps and thus is not compatible with a server scheduled script without making the process needlessly complex:
We use Windows Server so I use Windows Task Manager to control when the robot file does its thing. I understand there's a similar tool for Mac systems called Chronos--but I'm just going by memory based on another forum user's post.
I use it to schedule the FileMaker robot file to be opened at a specific time each day.
In the FileMaker File, I have no tables, only one blank layout and this script:
Perform Script [//I specify a script in one of the files hosted on the server]
This file is defined to open itself with an account name and password that matches an account defined in the hosted file. You do this by creating the account in Manage | Security and then using File Options to specify that the file open itself with this same account and password.
While in File Options, you also specify that the above script be run when the file is opened.
In our setup, we can get away with installing FileMaker Pro on the server machine as this script is scheduled to run late at night when there are no other users (Thus no performance "hit"). We also do not use Instant Web Publishing--I think Installing FileMaker Pro on the server might interfere with that.
If there are issues with installing FileMaker Pro on the server, you can set this up on any workstation linked to the server.