Sometime we have to update large number of records in our remote database of a client machine via a Serverside Filemaker script . After running the script in Filemaker server you came to know while monitoring that the script is missing some logic or having some logical problem due to which it updates wrong value at runtime and you want to stop that script.
In Filemaker Server we have no script debugger so that we can test a Filemaker script before full run. If we will edit the script in our Filemaker end then also it has no effect as once a thread ( serverside schedule) is capture in the Filemaker server machine, there is no way to stop a script forcefully at the runtime as long as the logic of the script tells to end the script. if that script will consume hours of time then it will ultimately slow down the server performance which causes erroneous results.Interrupting a schedule while it is in the middle of a process could have some damaging effects.
Yes it is true that we can’t stop forcefully a server-side script at runtime, so you may want to consider a way to stop a schedule after a certain break point. whenever you are feeling that the serverside script which you have written may cause a problem while at running in the server. Process is
1 ) Create a Table that has one stored indexed field and one having record. Set the flag field to 1 manually.
2 ) In the script itself put the condition before to the the sensitive part of the script (like looping) that
If (Table::Flag = 0)
3 ) Run the Serverside script in the Server by scheduling.
So the script is running in the server and now you got that script is giving wrong results while looping. Now inorder to stop that script go back to the Table of the remote Filemaker database and set the Flag field as 0 manually. While running, script encouters that the flag field has value 0 and it will halt the script.