Automated Execution of Lua Scripts with Transfer Events
Lua is embedded in Ascp and Ascp4, and HSTE can be configured to execute 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 executed are:
- Session Start
- Session Stop
- Session Progress
- File Start
- File Stop
Session Progress refers to the periodic event that generates the stats report found in the management stream.
To execute Lua scripts automatically, aspera.conf must include a
<transfer> element, with sub-elements that identify the scripts
and the transfer events at which they should be run. Scripts can be identified by
pathname, or they can be embedded in the sub-element 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 make use of several functions that are
provided to facilitate file system operations, logging, and aborting a session.