Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor corrections to text

Table of Contents

Scripting

...

Jobs in the Standard Unix Scripting Languages

...

Question:

...

(sh, Perl)

...

Yes! sh and Perl scripts can be launched as executables.

Even more interesting are scripted jobs that make use of the JobScheduler's API Interface, e.g.

  • to write to the JobScheduler logs which are visible in JOC, the JobScheduler Operations Center interface interface (and automatically mail logs in case of errors, warnings or success),
  • to set the job processing state,
  • to launch other jobs via API and to process job parameters.

Scripted jobs with the API support are not just launched in a new process, but run in a child instance of the JobScheduler which . This exposes the API objects and methods directly to the script. For the supported scripting languages The JobScheduler is linked to the respective language interfaces for the scripting languages supported.

Jobs that make use of the API are preferably written in

  • Java,
  • JavaScript
  • Perl jobs with API support may be operated for Windows provided that an ActiveState implementation is installed. For Linux and Solaris there are restrictions due to the fact that Perl is not threadsafe implemented, for both platforms we . We have to link the Perl libraries to the JobScheduler for these platforms.

a) Example Standalone Perl Script

The example package of the installation contains the files "scheduler_samples_perlscript.xml" and "sample_script_notification.pl" that show the configuration and implementation for a job named "sample_script_notification". Job starts for this simple script are triggered by changes in the given directory.

b) Example Perl Script using JobScheduler API

The file "sample_api_notification.pl" of the example installation package is a more complete example that demonstrates the usage of JobScheduler API for logging and error handling. This script moves files from one directory to another as soon as they appear and is triggered by directory notification. (this example script was tested for Windows (ActiveState) and Linux with Perl 5.8)

...