Adding system-level script sequence options
Note  The following information is for server administrators and group administrators.
In this Schedule assistant step, you can select the optional pre-processing and post-processing system-level scripts to run before and after the FileMaker script, optional script parameters, and specify the account to use to run the scripts.
Place system-level script files in the Scripts folder before starting the Schedule assistant:
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/
If you do not see the script you want, click Cancel to exit the Schedule assistant, copy the script to the Scripts folder on the FileMaker Server computer, and run the Schedule assistant again.
To add system-level script sequence options:
1. For Run before, choose an optional pre-processing system-level script that runs before the selected FileMaker script.
2. Enter optional Parameters for the pre-processing system-level script. Separate each parameter with a blank space. To include a blank space in a parameter, use quotation marks around the entire parameter. For example, “two words” is one parameter.
Note  Script parameters are passed to the system-level script as text. For example, if you enter the script parameter 5 + 5, then the text string “5 + 5” is passed to the script, not the value 10.
For information on system-level script parameters, see the documentation for the scripting language you are using.
3. For Run after, choose an optional post-processing system-level script that runs after the selected FileMaker script.
4. Enter optional Parameters for the post-processing system-level script.
5. Select Use a user account rather than the default account. For User Name and Password, specify the following:
Windows: User Name can refer to a local account on the master machine or a network domain account and can be specified in any of the following formats: username, domainname\username, or username@domainname.
macOS: User Name must refer to a local account on the master machine only and must be specified without a domain name. See the “macOS privileges” information in the notes below.
6. Click Next.
Click Back to return to the previous step or Cancel to exit the Schedule assistant.
macOS privileges: The User Account you can use to run system-level scripts must have the correct privileges for the actions you want the script to perform. You can use the fmserver user account or a local user account on the master machine only. You cannot use a network domain account.
If you choose the fmserver user account, you may need to modify file permissions for the script. Your script is executed with the fmserver user ID and fmsadmin group ID, so your script file must have read and execute permissions for the fmsadmin group. Therefore, if you choose the fmserver user account, you cannot call some privileged commands from your scripts. For example, your script does not have access to the /etc folder.
Script name and Parameters added together can be a maximum of 2048 characters.
In Windows, User Name can be a maximum of 104 characters, and Password can be a maximum of 128 characters.
In macOS, User Name can be a maximum of 255 characters, and Password can be a maximum of 31 characters.
If you choose to send email notification later in the Schedule assistant, the email message includes any error or warning conditions or confirmation of a successful completion of the Script Sequence scheduled task.
See Creating Script Sequence tasks.
Related topics 
Scheduling administrative tasks