Chapter 4. Working with Tivoli Dynamic Workload Broker 143
4.1.2 Tivoli Dynamic Workload Broker Tivoli Workload Scheduler
Agent plug-in
The Tivoli Dynamic Workload Broker Tivoli Workload Scheduler agent (also
referred to as the TWS Agent) is a bridge between the Tivoli Dynamic Workload
Broker server and a Tivoli Workload Scheduler domain manager. The TWS
Agent is installed on the Tivoli Dynamic Workload Broker server machine. This
machine is configured in Tivoli Workload Scheduler as a standard agent but does
not have all of the functions of a standard agent. The TWS Agent is not a Tivoli
Dynamic Workload Broker Workload Agent and is not one of the computers
managed by Tivoli Dynamic Workload Broker for job submission.
The TWS Agent is a plug-in for the Tivoli Dynamic Workload Broker server that
may be installed after the Tivoli Dynamic Workload Broker server installation
without uninstalling the Tivoli Dynamic Workload Broker server.
4.2 Working with jobs
A job is an executable file or a script that is assigned to a resource by the Tivoli
Dynamic Workload Broker server. The resource defines the Tivoli Dynamic
Workload Broker managed computers that may be used to run the job. Tivoli
Dynamic Workload Broker provides the status of the jobs and the managed
computers.
4.2.1 Job definitions
Each job is created as a job definition. Job definitions are stored in the Tivoli
Dynamic Workload Broker Job Repository DB2 database. A job definition is
written using Job Submission Description Language (JSDL) statements. This is
sometimes also called Job Submission Definition Language in the IBM manuals.
A job definition written in JSDL describes the job requirements for submission to
resources. The JSDL language contains a vocabulary and normative XML
schema that facilitate the expression of those requirements as a set of XML
elements. Knowledge of XML is helpful, but not essential, for working with job
definitions. Job definitions are created in files with the extension of
jsdl.
144 Getting Started with Tivoli Dynamic Workload Broker Version 1.1
Example 4-1 is an example of a job definition with:
򐂰 The name is testjob1.
򐂰 The executable is a file test1script.ksh that must exist on a Tivoli Dynamic
Workload Broker managed computer in the directory /tmp.
There is no resource specified so the Tivoli Dynamic Workload Broker server will
assign an available resource. There may be different versions of the script
/tmp/test1script.ksh on different computers managed by Tivoli Dynamic
Workload Broker. This could result in different job behavior for each job
submission depending upon the computer selected by Tivoli Dynamic Workload
Broker to run the job.
Example 4-1 Job definition jsdl file referencing an executable file
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition
xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"
description=" Test Job 1" name="testjob1">
<jsdl:annotation>Job definition created within JBDC</jsdl:annotation>
<jsdl:application name="executable">
<jsdle:executable path="/tmp/test1script.ksh"/>
</jsdl:application>
</jsdl:jobDefinition>
Example 4-2 is an example of a job definition with:
򐂰 The name is “testjob2”.
򐂰 The executable is a script that is contained in the job definition.
򐂰 The resource to use is the computer “gridnode0135”.
The script to run is part of the job definition. You can change the resource and
the script will remain the same because it is part of the job definition.
Example 4-2 Job definition jsdl file containing an executable script
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition
xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"
description="Test Job 2" name="testjob2">
<jsdl:application name="executable">
<jsdle:executable>
<jsdle:script>#!/bin/ksh
Chapter 4. Working with Tivoli Dynamic Workload Broker 145
echo " test job 2: Hello World !!!"
</jsdle:script>
</jsdle:executable>
</jsdl:application>
<jsdl:resources>
<jsdl:candidateHosts>
<jsdl:hostName>gridnode0135</jsdl:hostName>
</jsdl:candidateHosts>
</jsdl:resources>
</jsdl:jobDefinition>
Example 4-3 is an example of a job definition where:
򐂰 The name is “testjob3”.
򐂰 The executable is a script that is contained in the job definition.
򐂰 The resource to use is the group “computers”.
In this example only physical computers are in the group “computers”.
Unpredictable results will occur if the group “computers” contains both physical
computers and logical resources.
Example 4-3 Job definition jsdl file with a computer resource group
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition
xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"
description="resource group - only computers" name="testjob3">
<jsdl:application name="executable">
<jsdle:executable>
<jsdle:script>
#!/bin/ksh
echo "running test3 script"
</jsdle:script>
</jsdle:executable>
</jsdl:application>
<jsdl:resources>
<jsdl:group name="computers"/>
</jsdl:resources>
</jsdl:jobDefinition>

Get Getting Started with Tivoli Dynamic Workload Broker Version 1.1 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.