After you install the product, you can use scripts to complete various tasks.
jobrecovery.bat|.sh batch script
You can use the jobrecovery script to enable a secondary site to take over when the primary site fails.
Purpose
In this scenario, each site has a separate WebSphere cell where an active job is running on the primary site, and a stopped or job scheduler is on the secondary site. The batch cells on the primary and
secondary sites are expected to be clones of one another with the same topography and the same names.
They share the same database, not replicas of a database.
Location
The jobrecovery script is located either in the app_server_root/bin directory or in the
app_server_root/profiles/{LRS_profiles}/bindirectory on the designated LRS backup server. If the script is run from the app_server_root/bin directory, the profileName option must be specified. Otherwise, do not specify the profileName option. The user name and password options are required if security is enabled on the server which is running the LRS. Run on the backup cell after the primary cell is shut down. After it is run, the backup cell can be started.
Usage
When the primary site fails, you are instructed to follow a takeover procedure that includes the following steps:
1. Ensure that all batch servers on the primary site are stopped.
2. Run the jobrecovery script on the secondary site.
3. Start the job scheduler on the secondary site.
./jobRecovery.sh server [options]
Options
-profileName profile
Use this optional parameter to specify the stand-alone application server profile name when the script is run from the app_server_root/bin directory.
-username authentication username
Use this optional parameter to specify a user name.
-password authentication password
Use this optional parameter to specify an authentication password for the user name.
Example
./jobRecovery.sh server1 -profileName AppSrv01 -username wsadmin -password wspassword
uteconfig.bat|.sh batch script
You can use the uteconfig script to configure the unit test environment (UTE). Run the script to create a job scheduler configuration on the WebSphere Application Server profile that is used in Rational
Application Developer.
Purpose
Use the uteconfig script to create a job scheduler configuration on the application server profile. The script creates Derby resources, deploys the job scheduler application (LongRunningScheduler.ear), creates a work manager, and otherwise configures a UTE on the profile. The UTE provides an environment for testing applications developed with Rational Application Developer.
Location
The uteconfig.bat|.sh script is located in the bin directory of an application server profile; for example, app_server_root/profiles/AppSrv01/bin. You must have a stand-alone application server profile to run the script.
The uteconfig.bat|.sh script also is located in the main bin directory of the product; for example, app_server_root/bin.
Usage
1. Open a command prompt on a bin directory that has the uteconfig.bat|.sh script.
It is recommended to run the uteconfig script from the bin directory of the application server profile. To run the uteconfig script successfully from the main bin directory, app_server_root/bin, your product installation must have only one application server profile.
2. Run the uteconfig.bat|.sh script.
The script takes about one minute to run and provides progress messages.
Options
None
Example
./uteconfig.sh
configCGSharedLib.py batch script
You can use the configCGSharedLib.py Jython script to assign the shared library to the job scheduler.
Purpose
The configCGSharedLib.py script is provided with the product. The configCGSharedLib.py script assigns the shared library to the job scheduler.
Location
At installation, the configCGSharedLib.py script is copied onto the installation target in the app_server_root/bindirectory.
Usage
To run the configCGSharedLib.py script with the wsadmin utility, use this command:
wsadmin -lang jython -f configCGSharedLib.py <option>
You might have to modify the wsadmin command to wsadmin.sh or wsadmin.bat, depending on your operating system environment.
To see a list of all available operations, use the following command:
wsadmin -lang jython -f configCGSharedLib.py --help
removePGC.py batch script
You can use the removePGC.py Jython script to remove the common batch container from your deployment target.
Purpose
The removePGC.py script is provided with the product. The removePGC.py script removes the common batch container from your deployment target or removes it when your deployment target is the only target.
Location
At installation, removePGC.py is copied onto the installation target machines in the app_server_root/bin directory.
Usage
To run removePGC.py script with the wsadmin utility, use this command:
wsadmin -lang jython -f removePGC.py <option>
You might have to modify the wsadmin command to wsadmin.sh or wsadmin.bat, depending on your operating system environment.
To see a list of all available operations, use the following command:
wsadmin -lang jython -f removePGC.py --help
Operations
Use the following option with this command:
--list
Lists the targets that have the common batch container.
Example
Use following command to list the targets which have the common batch container:
wsadmin -lang jython -f removePGC.py --list For example:
>> wsadmin -lang jython -f removePGC.py --list
INFO: Grid Execution Environment was found on following targets:
cell=myCell,cluster=Endpoint1 cell=myCell,cluster=Endpoint2
cell=myCell,node=myNode01,server=server1
redeployLRS.py batch script
You can use the redeployLRS.py Jython script to redeploy the job scheduler on your deployment target.
Purpose
The redeployLRS.py script is provided with the product. The redeployLRS.py script redeploys the job scheduler on your deployment target.
Location
At installation, redeployLRS.py is copied onto the installation target in the app_server_root/bin directory.
Usage
To run redeployLRS.py script with the wsadmin utility, use this command:
wsadmin -lang jython -f redeployLRS.py <option>
Modify the wsadmin command to wsadmin.sh or wsadmin.bat, depending on your operating system environment.
To see a list of all available operations, use the following command:
wsadmin -lang jython -f redeployLRS.py --help
wsgridConfig.py batch script
Use the wsgridConfig.py script to configure the three steps that are required for configuring the external scheduler interface.
Purpose
The wsgridConfig.py script performs the following three steps required for configuring the external scheduler interface:
1. Installs JobSchedulerMDI.ear.
2. Configures the service integration bus.
3. Configures JMS artifacts.
Location
At installation, wsgridConfig.py is copied onto the installation target machines in the app_server_root/bin directory.
Example
To configure WSGrid on a scheduler cluster, use the following command:
wsadmin.sh -user username -password userpassword -f ../bin/wsgridConfig.py -install -cluster clusterName -providers providerList
where clusterName is the scheduler cluster name.
To configure WSGrid on a single scheduler server, use the following command:
wsadmin.sh -user username -password userpassword -f ../bin/wsgridConfig.py -install -node nodeName -server serverName -providers providerList
where nodeName is the node name of the scheduler server.
providerList identifies a list of provider endpoints in the format
hostname1,portnumber1[;hostname2,portnumber2...], where portnumber identifies the
SIB_ENDPOINT_ADDRESS or SIB_ENDPOINT_SECURE_ADDRESS port of the scheduler server, and hostname1 and hostname2 identifies the host name of the servers in the scheduler cluster.
To remove WSGrid configurations, use the following commands:
wsadmin.sh -user username -password userpassword -f ../bin/wsgridConfig.py -remove -cluster clusterName
wsadmin.sh -user username -password userpassword -f ../bin/wsgridConfig.py -remove -node nodeName -server serverName
JobSchedulerCommands command group for the AdminTask object
You can use the Jython or Jacl scripting languages to configure the job scheduler with the wsadmin tool.
The commands and parameters in the JobSchedulerCommands command group can be used to manage configuration attributes and custom properties.
Use the following commands to manage the job scheduler:
v “showJobSchedulerAttributes”
v “modifyJobSchedulerAttribute” on page 86 v “createJobSchedulerProperty” on page 86 v “modifyJobSchedulerProperty” on page 87 v “removeJobSchedulerProperty” on page 88 v “listJobSchedulerProperties” on page 88
showJobSchedulerAttributes
The showJobSchedulerAttributes command shows all configuration attributes of the job scheduler.
Target object None
Required parameters None
Optional parameters None
Return value
The command returns a list of all attributes of the job scheduler.
Batch mode example usage v Using Jacl
$AdminTask showJobSchedulerAttributes v Using Jython
AdminTask.showJobSchedulerAttributes() Interactive mode example usage v Using Jacl:
$AdminTask showJobSchedulerAttributes v Using Jython:
AdminTask.showJobSchedulerAttributes()
modifyJobSchedulerAttribute
The modifyJobSchedulerAttribute command modifies a configuration attribute of the job scheduler.
Target object None
Required parameters -name
Specifies the name of the attribute to modify. (String) The following attributes are supported.
1. datasourceJNDIName (default value is jdbc/lrsched) 2. databaseSchemaName (default value is LRSSCHEMA) 3. deploymentTarget (default value is none)
4. endpointJobLogLocation (default value is ${GRID_JOBLOG_ROOT}) 5. enableUsageRecording (default value is false)
6. enableUsageRecordingZOS (default value is false) Optional parameters
-value
Specifies the value of the attribute. (String) If not specified, the default value for the respective attributes is assigned.
Return value
The command returns the job scheduler object ID.
Batch mode example usage v Using Jacl:
$AdminTask modifyJobSchedulerAttribute {-name datasourceJNDIName -value "jdbc/ds"}
v Using Jython:
AdminTask.modifyJobSchedulerAttribute(’[-name datasourceJNDIName -value jdbc/ds]’) Interactive mode example usage
v Using Jacl:
$AdminTask modifyJobSchedulerAttribute {-interactive}
v Using Jython:
AdminTask.modifyJobSchedulerAttribute(’[-interactive]’)
createJobSchedulerProperty
The createJobSchedulerProperty command creates custom properties for the job scheduler.
Target object None
Required parameters -name
Specifies the name of the custom property to create. (String)
-value
Specifies the value of the custom property. (String) Optional parameters
-description
Specifies the description of the custom property. (String) Return value
The command returns the properties object ID.
Batch mode example usage v Using Jacl:
$AdminTask createJobSchedulerProperty {-name bjsProp1 -value "bjsprop1"}
v Using Jython:
AdminTask.createJobSchedulerProperty(’[-name bjsProp1 -value bjsprop1]’) Interactive mode example usage
v Using Jacl:
$AdminTask createJobSchedulerProperty {-interactive}
v Using Jython:
AdminTask.createJobSchedulerProperty(’[-interactive]’)
modifyJobSchedulerProperty
The modifyJobSchedulerProperty command modifies custom properties for the job scheduler.
Target object None
Required parameters -name
Specifies the name of the custom property to modify. (String) -value
Specifies the value of the custom property. (String) Optional parameters
-description
Specifies the description of the custom property. (String) Return value
The command returns the properties object ID.
Batch mode example usage v Using Jacl:
$AdminTask modifyJobSchedulerProperty {-name bjsProp1 -value "bjsprop1"}
v Using Jython:
AdminTask.modifyJobSchedulerProperty(’[-name bjsProp1 -value bjsprop1]’) Interactive mode example usage
v Using Jacl:
$AdminTask modifyJobSchedulerProperty {-interactive}
v Using Jython:
AdminTask.modifyJobSchedulerProperty(’[-interactive]’)
removeJobSchedulerProperty
The removeJobSchedulerProperty command removes custom properties of the job scheduler.
Target object None
Required parameters -name
Specifies the name of the custom property to remove. (String) Optional parameters
None Return value
The command returns the properties object ID.
Batch mode example usage v Using Jacl:
$AdminTask removeJobSchedulerProperty {-name bjsProp1}
v Using Jython:
AdminTask.removeJobSchedulerProperty(’[-name bjsProp1]’) Interactive mode example usage
v Using Jacl:
$AdminTask removeJobSchedulerProperty {-interactive}
v Using Jython:
AdminTask.removeJobSchedulerProperty(’[-interactive]’)
listJobSchedulerProperties
The listJobSchedulerProperties command lists all of the custom properties the job scheduler.
Target object None
Required parameters None
Optional parameters None
Return value
The command returns a list of all of the custom properties of the job scheduler.
Batch mode example usage v Using Jacl:
$AdminTask listJobSchedulerProperties v Using Jython:
AdminTask.listJobSchedulerProperties() Interactive mode example usage v Using Jacl:
$AdminTask listJobSchedulerProperties v Using Jython:
AdminTask.listJobSchedulerProperties()