You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

THIS PAGE IS 'WORK IN PROGRESS'

Introduction

There are a number of methods available for controlling job execution on remote servers with JobScheduler. The most important of these are:

Whilst the possibilities offered by SSH execution are limited (see What is the difference between SSH-Job execution and remote JS-Agents?), the possibilities offered by Agents or remote JobSchedulers has also somewhat restricted, in that they rely on process classes.
Process classes have had the disadvantage that instances of the job chain and job have to exist (and be maintained) on every JobScheduler that the job is to be (potentially) executed on.

The technique described on this page has been introduced with JobScheduler version 1.7 and allows a job in a job chain to be executed on a remote JobScheduler without neither the need for a job chain or the job itself to be installed in the live folder of the remote JobScheduler nor the need for a process class to be defined.
The remote JobScheduler is simply defined by setting the scheduler.remote_scheduler order parameter:

The ease with which this method allows remote JobScheduler's to be set means that job execution on remote JobSchedulers can more flexibly allocated than with process class based methods. In particular, it allows the decision about which JobScheduler a job is to be executed on to depend on the result of the preceding job.
In addition, only one instance of the job and job chain need to be defined in the live folder of the 'main' JobScheduler, thereby considerably increasing flexibility and reducing maintenance.

Example

An example has been prepared and can be downloaded from:

To get the example ready to use, simply unpack the 'remote_scheduler_variable_demo.zip' file into your JobScheduler's 'live' folder.

If you then open the folder containing the example in JobScheduler's JOE interface you will see that the example consists of a job chain ("Job_Chain_1") with three nodes ("Start", "Job_1" & "End") and two orders:

  • Order_1_Local
  • Order_2_Homer-4432

TODO: ADD GV DIAGRAM OF JC

When "Order_1_Local" is started - for example, using JobScheduler's JOC interface, "Job_Chain_1" will be executed on the local host - i.e. the JobScheduler in whose file system the demo files were unpacked.

The order "Order_2_Homer-4432" causes the same job chain to be executed by the JobScheduler listening to port 4432 on the server "homer".

The JobScheduler that is to execute the job chain is specified as an order parameter as can be seen in the screenshot below:

TODO: ADD SCREENSHOT

or, in the XML of the {{Job_Chain_1,Order_2_Homer-4432.order.xml<code> file:

<source>
<params>
<param name="scheduler.remote_scheduler" value="homer.sos:4432" />
</params>
</source>

To get "Order_2" to be executed on a remote JobScheduler in your network simply change the <code>scheduler.remote_scheduler}} parameter in either JOE or directly in the "Job_Chain_1,Order_2_Homer-4432.order.xml" file to a suitable address and start the order in JOC.
TODO: ADD SCREENSHOT

Once the order has run, open the log file and you will see that "Job_1" causes either {{COMPUTERNAME = yourConputerName }} (for a Windows computer) or {{HOSTNAME = yourHostName }} (for a Linux computer) to be written to the file.

No scheduler.remote_scheduler parameter is set in the "Order_1_Local" order and therefore "Job_1" will enter the name of your local computer / host in the log file.

Application in a Production Environment:

In a production environment, particularly one where a large number or remote servers were being addressed, the scheduler.remote_scheduler parameters would be saved in an .inc file, which would be loaded as required.

See Also:

  • No labels