Running system-level script files
FileMaker Server can run system-level script files, such as a Windows batch command, VBScript, or macOS shell script (bash, Perl, Python). You create a Run Script
scheduled task, specify the script file and optional script parameters, the user account to use to run the script, and when to run the script. Use system-level scripts to perform tasks outside of FileMaker Server.
To run a script as a scheduled task, you must place the system-level script file in the FileMaker Server Scripts folder:
•Windows: [drive]:\Program Files\FileMaker\FileMaker Server\Data\Scripts\
If FileMaker Server is installed in a non-default location, the beginning portion of the default path shown above, \Program Files\FileMaker\FileMaker Server, is replaced with the path that was specified during installation. For example: \My_Path\Data\Scripts\
•macOS: /Library/FileMaker Server/Data/Scripts/
For information about creating system-level scripts, see the documentation for the scripting language you want to use.
Notes
•You must include error-handling and branching logic in your system-level scripts. Make sure that the script syntax is correct and does not hang due to infinite loops or the availability of external resources. You can select
Abort schedule if time limit reached or server stopped in the Schedule
assistant to abort the system-level script schedule if the script takes longer to run than the specified time limit, or if the Database Server stops. If you do not select
Abort schedule if time limit reached or server stopped and a system-level script hangs, look in the Event.log file for the process ID of the hung script to terminate. (See
Event log.)
•Enable some form of logging in your script so that you can troubleshoot possible permissions issues. Refer to the Apple website for information on creating log files in macOS.
•Do not use system-level scripts that invoke a user interface.
Related topics