Creating Script Sequence tasks
Create a
Script Sequence scheduled task to run an optional
pre-processing system-level script, next run a FileMaker script, and then run an optional
post-processing system-level script.
A script sequence can perform pre-processing on files before importing them into FileMaker Pro database, run a FileMaker script to perform processing on the database and export files, and then perform post-processing on the exported files. For example, create a script sequence that first runs a pre-processing system-level script that validates and reformats a text file exported from another database. Next, the script sequence runs a FileMaker script that imports the text file, combines it with data stored in a FileMaker Pro database, and generates multiple personalized reports in Excel format. Lastly, the script sequence runs a post-processing system-level script that creates a zip file of the reports and places them into a download directory for users.
When creating system-level scripts and FileMaker scripts for a script sequence, keep the following in mind:
• The pre-processing script (if one is specified) must return a value of 0 (zero) in order for the script sequence to proceed to the FileMaker script.
• The FileMaker script must return a value of 0 (zero) in order for the script sequence to proceed to the post-processing script (if one is specified).
• The post-processing script (if one is specified) must return a value of 0 (zero) in order for the schedule to complete successfully.
• 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 script sequence schedule if the sequence of scripts 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.)
• If you select a FileMaker script only and no pre-processing and post-processing scripts, the Script Sequence scheduled task is the same as a FileMaker Script scheduled task.
For information about FileMaker script steps and functions, see FileMaker Pro Help.
Note Enable email notifications in the Script Sequence scheduled task to receive a message for error or warning conditions, or confirmation of a successful completion.
Related topics