I want to explore how to script a script into a field of a server scripts logger stand-alone file that would be executed serially by FMS as a scheduled script.
I can imagine either a button that when clicked — or any scripted action — sends the parameters necessary to be used in the script to be run by server…as well as the script name itself - all encoded as an fmpURL in a field in the Server Script Logging file.
On the Admin side, I'd create a scheduled script that repeats at the frequency desired, say…every minute? This script tells the server to go to that table and find the first record that hasn’t been processed. It sets a value into a field to denote that it has begun the script (timestampUTC), which also auto-enters a 1 to denote “started”.
It grabs and decodes the fmpURL in the field and runs THAT script with the attached parameters within that fmpURL. It ensures serial processing of scripts to guard against too many PSoS sessions being fired. The latter could cause all kinds of data discrepancies from incomplete script executions.
Each script finishes out by setting a completion value (timestampUTC) and it’s auto-entered companion zero (0) value to denote completion, and another auto-calculated timestampUTC for duration. This can be used to ensure problem scripts are flagged as “1’s” — only processing records from a find where no value exists in that check-bit field. I can only imagine how this can be used for serious performance analysis.
Does anyone know if this has already been accomplished, or how I may want to go about doing this?
Thanks in advance,
- - Scott