Script Library

Script Libraries allow you to create "libraries" of commonly used code or data that can be shared among scripts in adTempus. For example, suppose that you have several jobs where you need to pass the current date as one of the command-line parameters to the scheduled program (but the other parameters are different for each job, so you cannot use a single script for all of the jobs).

Rather than repeating the necessary formatting code in the command-line script for each task, you can create a function in a Script Library, and then reference the library from the scripts. This in turn allows you to call the functions and subroutines defined in that library.

A Script Library can contain any code or data declarations that are valid for the scripting language you specify for the library. A script can only use libraries that are in the same scripting language.

For examples, refer to the predefined libraries provided with adTempus.

Because the Windows Script Host does not support multiple namespaces, all of the code for a script and for all of the libraries it references end up in the same namespace. You therefore must take care that you do not have variables or procedures in different libraries that have the same name, if those libraries will be used by the same script.

 

Script Library Properties

Predefined libraries

Overview of using scripts in adTempus