You can implement scripts to run whenever various events occur while ArchiveOne is running. For instance, if you want a task to be executed whenever a policy is started, you can introduce a script to do this. By default, scripts are not implemented.
Scripts are launched by the ArchiveOne Service, so you must run scripts using the service account rights. Scripts run asynchronously, that is, they are launched when an event occurs, and ArchiveOne continues to run while the script is being run. However, there is one exception: it is not possible for a script to influence the running of ArchiveOne Service. For example, the Phase1ScheduledStart event cannot return a state indicating that the policy should not run.
Events can be configured to run synchronously. The service execution is suspended until the script has completed. To prevent halting the service entirely, you can set the script with a timeout value in seconds. If the script has run for longer than the configured number of seconds, service processing continues, and the script is not explicitly stopped.
Events are given arguments which include policy names, counts of messages, and error messages. Attempts to raise events and script launching errors are all logged in the diagnostic tracing.
Each event has a default script name. When the service wishes to raise an event, it checks for the presence of the script. If absent, the event is not raised. All scripts must be in the Scripts subdirectory of the service installation directory.
The names of the scripts can be changed by editing the file Scripts.INI in the Add-ins\AOnePol directory. Specifically, the default script names all use VBS extensions, but can be changed to another scripting language such as JS.
The scripts are invoked using the application (script processor) associated with the script file extension, and arguments to the script pass as command line parameters. This means any file type can be used, including BAT or EXE.
To configure an event to be synchronous, add an entry into Scripts.INI which is the event name, then _Timeout= , followed by the number of seconds to wait before the script times out. Set the timeout value to 0 or remove the line to set the script to asynchronous.
For instance, the Scripts.INI line:
Phase1StartNowStart_Timeout=300
Causes the service to pause for up to five minutes while the Phase1StartNowStart.VBS script runs.