Automated execution of Lua scripts with transfer Events
Lua is embedded in Ascp and Ascp4, and HSTS can be configured to run custom Lua scripts automatically at specific transfer events. In addition, Lua functions that can be used for monitoring and managing transfer sessions are provided by Ascp and Ascp4.
The transfer events at which scripts can be run are:
- Session Start
- Session Stop
- Session Progress
- File Start
- File Stop
Session Progress refers to the periodic event that generates the stats report that is found in the management stream.
To run Lua scripts automatically, aspera.conf must include a <transfer> element, with subelements that identify the scripts and the transfer events at which they must be run. Scripts can be identified by path name, or they can be embedded in the subelement itself in the form of base64 output. Scripts can access transfer session data, which is stored in a Lua table (env_table[]). They can also use several functions that are provided to facilitate file system operations, logging, and aborting a session.