Scheduling administrative tasks > Running server-side scripts > Running FileMaker scripts
 
Running FileMaker scripts
Note  The following information is for server administrators and group administrators.
FileMaker Server can run FileMaker scripts that are created in hosted databases. You create a schedule to run a FileMaker script scheduled task, specify the database and the FileMaker account to use to run the script, choose a script created in the database, and when to run the script. FileMaker scripts that run on FileMaker Server can do simple or complex tasks such as:
perform a field recalculation across all records
process and archive new transactions nightly
remove duplicate records before a scheduled backup
You use the Script Workspace in FileMaker Pro to build scripts by selecting from a list of FileMaker Pro commands, called script steps, and specifying options. To run a FileMaker script on FileMaker Server:
The script should include script steps that are supported in a FileMaker Server schedule.
The script must be defined in a database file that is hosted on FileMaker Server. See Hosting databases.
For information about creating FileMaker scripts with script steps that are supported in a FileMaker Server schedule, see FileMaker Pro Help. FileMaker Pro Help has information on how server-side scripts run.
Notes
You can select Abort schedule if time limit reached or server stopped in the Schedule assistant to abort the FileMaker 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 FileMaker script hangs, you can stop the script on the Activity > Clients tab. (See Event log.) You can stop the script on the Activity > Clients tab.
Some script steps have options that are skipped, such as an option to show a dialog box. The Event.log file contains detailed information about errors or script steps that are skipped when FileMaker Server runs FileMaker scripts. See Viewing log file entries.
For server-side FileMaker scripts, Get(AccountName) initially returns the account name that the script was run under (specified in the Schedule assistant when the schedule is created).
If you run a FileMaker script that uses the import ODBC script with a third-party ODBC driver, you need to use the 64-bit version of the ODBC driver. For a script that runs on the server, only 64-bit ODBC drivers are supported.
Related topics 
Creating, editing, duplicating, and deleting a schedule
Running server-side scripts
Scheduling administrative tasks