OPEN SOURCE - Job Scheduler - Solutions by Sample Jobs

Job Scheduler
 
    Sample Jobs

  These jobs are samples of implementations in different languages such as Java, JavaScript, Perl and VBScript. They include samples showing how to start a job triggered by changes in a directory and the implementation of web services for your jobs.

These sample jobs are not included in the Job Scheduler distribution, you can download the documentation and source code for the respective samples below.


Jobs with Perl and PerlScript

First of all consider your platform and the Perl version that you are using: for Unix systems Perl is included in the distribution, for Windows systems a widespread Perl implementation is provided by ActiveState (www.activestate.com). At the time of writing version 5.8 of Perl has been tested to work with the Job Scheduler, other Perl releases might not work as expected.

Next, there are two ways to run Perl in the Job Scheduler:

  • Running Perl scripts as executable files.

    This can be done with any Perl version, just tell the Job Scheduler to launch your Perl interpreter with the appropriate script.

  • Running Perl scripts using the Job Scheduler's built-in Perl interface.

    This mode uses the Job Scheduler's Perl programming interface. Your scripts could use the Job Scheduler's API methods for logging, error handling etc.


Configurations for the sample jobs are given in the scheduler_samples_perlscript.xml file that could be included via <base file="scheduler_samples_perlscript.xml"/> into the scheduler.xml configuration file. Use the Job Scheduler's own graphical Job Configuration Editor to adjust the configuration.

  • Job: Hello World

    This job uses the built-in Perl interface of the Job Scheduler to say "hello world".
    See the job documentation for implementations in other languages.

    Show Job Documentation     

  • Job: Run Script with Perl Interpreter triggered by Notification (sample_script_notification)

    This job just launches the appropriate Perl interpreter, you have to adjust the path to suit your interpreter.

    Show Job Documentation      Show Job Source Code

  • Job: Run script with use of the API triggered by Notification (sample_api_notification)

    This job is an example for use of the Job Scheduler API. The implementation triggers multiple input directories and moves incoming files to an output directory.

    Show Job Documentation      Show Job Source Code

You will find more Perl Jobs in the Standard Jobs section.


Jobs with JavaScript

The Job Scheduler exposes a JavaScript interpreter for all supported platforms. JavaScript is implemented by the Spidermonkey open source project (http://www.mozilla.org/js/) and is included in the Job Scheduler binaries. This means that no additional libraries are required.
At the time of writing version 1.5 of Spidermonkey is included in the Job Scheduler.

Spidermonkey JavaScript can be expanded with Java methods that are dynamically compiled at run time to overcome limitations in file handling and XML processing.

Please note that JavaScript is not the same as JScript which is implemented by Microsoft for Windows. We offer limited support for JScript which is not a documented feature.

Configurations for the sample jobs are given in the file scheduler_samples_javascript.xml file that could be included via <base file="scheduler_samples_javascript.xml"/> into the scheduler.xml configuration file. Use the Job Scheduler's own graphical Job Configuration Editor to adjust the configuration.

  • Job: Hello World

    This job uses the built-in JavaScript interpreter (Spidermonkey) to say "hello world".

    Show Job Documentation     

  • Job: Run Script with JavaScript Interpreter triggered by Notification (sample_api_notification)

    JavaScript does not support file operations, but can be extended on the fly with Java methods. In this example you will see how JavaScript and Java can be mixed in a script.

    Show Job Documentation      Show Job Source Code

You will find more JavaScript Jobs in the Standard Jobs section.


Jobs with Java

The Job Scheduler supports job implementations for Java starting with version 1.4.
The respective path to the JRE (or JDK) binaries must be given in your system's path.

Configurations for the sample jobs are given in the scheduler_samples_java.xml file that could be included by adding <base file="scheduler_samples_java.xml"/> to the scheduler.xml configuration file. Use the Job Scheduler's own graphical Job Configuration Editor to adjust the configuration.

  • Job: Hello World

    This job uses scripting for Java to say "hello world". The source code is compiled at run time by the Job Scheduler should a JDK be present in your path.

    Show Job Documentation     

  • Job: Run Java Class triggered by Notification (sample_api_notification)

    Functionally this example is the same as the above for Perl and JavaScript: the job is automatically started by changes to a directory and moves files to a different directory.

    The source code is compiled at run time by the Job Scheduler should a JDK be present in your path. Alternatively you could compile this class and add it's path to the class_path entry in your factory.ini configuration file.

    Show Job Documentation      Show Job Source Code

You will find more Java Jobs in the Standard Jobs section.


Jobs with VBScript

VBScript is implemented by Microsoft and available for Windows only. The Job Scheduler uses an existing VBScript installation to expose this interface to your jobs.
At the time of writing version 5.6 of VBScript has been tested to work with the Job Scheduler.

Configurations for the sample jobs are given in the scheduler_samples_vbscript.xml file that could be included via <base file="scheduler_samples_vbscript.xml"/> into the scheduler.xml configuration file. Use the Job Scheduler's own graphical Job Configuration Editor to adjust the configuration.

  • Job: Hello World

    This job simply says "hello world" using the Job Scheduler's VBScript interface.

    Show Job Documentation     

  • Job: Run Script in VBScript Interpreter triggered by Notification (sample_api_notification)

    Functionally this example is the same as those above for Perl, JavaScript and Java: the job is automatically started by changes to a directory and moves files to a different directory.

    Show Job Documentation      Show Job Source Code

  • Job: Run Microsoft LogParser for Analysis or Conversion of Log Files (sample_logparser)

    This job shows how to use the API methods of the Microsoft LogParser and the Job Scheduler's API to automate the analysis and conversion of log files.

    This sample reads the Job Scheduler log file and converts entries to a configurable output format. The sample implements a tabulated output format and output to a database, see the LogParser homepage (http://www.logparser.com) for details on this component.

    Show Job Documentation      Show Job Source Code

You will find more VBScript Jobs in the Standard Jobs section.
 
 
 
 
  Office Automation - Document Delivery - Job Scheduling - Systems Integration - Output Management - Enterprise Application Integration - Connectivity