Use this topic to submit and track administrative jobs in a flexible management
environment using the wsadmin tool.
Before you begin
Deprecated feature: The job manager is
deprecated. Instead of job manager, use Urban Code Deploy to install the product, to deploy
applications, and to manage remote hosts. To manage
WebSphere® Application Server installations, you also can use swinging profiles.
See
Swinging profiles between product installations.
Configure a job manager, administrative agent, and register nodes and deployment managers with
the job manager to set up a flexible management environment. You can optionally create management
groups to simultaneously submit a job to multiple nodes.
About this task
After configuring your flexible management environment, you can submit, monitor, and manage jobs
for the nodes that are registered with the job manager. Your ID at the job manager must be
authorized for the administrator role or the operator role to submit jobs. Your ID at the job
manager must be authorized for the administrator role or the operator role to submit jobs. When you
submit a job, you can specify a user name and password for authentication and authorization at the
target node or nodes. If you do not provide a user name and password in the job parameters, the
credentials for the job submitter at the job manager are used for this purpose.
Note: When you
submit a job to multiple target nodes, the user name and password or the credentials for the
submitter must be applicable to all of the job targets.
Procedure
-
Launch the wsadmin tool.
Navigate to the
app_server_root/bin directory and use the
following command to connect the wsadmin tool to the job manager
process:
wsadmin -profileName myJobManager -lang jython
-
Submit the administrative job to the job manager.
Use the submitJob command to submit administrative jobs. Job submissions consist of the following information:
- Job type
- The job type specifies the type of job to perform. Many jobs exist in the flexible management
environment including application management, configuration, and application server runtime control
jobs.
- Job target list and target group
- The job target list and group specifies the nodes and node groups where the job runs.
- Job specific parameters
- Most administrative jobs require information in addition to the job type and target in order to
run the job. Job parameters are specific to each job type.
Note: When you submit a job to multiple
target nodes, the user name and password or the credentials for the submitter must be applicable to
all of the job targets.
- Optional generic parameters
- In addition to the job specific parameters, you can include any of the following optional
parameters with the job submission:
Table 1. submitJob optional generic parameter descriptions . Specify optional parameters with a dash (-) before the parameter name.
Parameter |
Description |
Type |
username |
Specifies the username to use to submit the job when security is
enabled. |
String |
password |
Specifies the password for the username to use to submit the job when security
is enabled. |
String |
description |
Specifies a description for the job. |
String |
activationDateTime |
Specifies the date and time to activate the job in the format
"2006-05-03T10:30:45-0000". The "-0000" section of the activationDateTime
parameter value represents the timezone. You can specify Z as a shortcut for Greenwich Mean
Time (GMT), such as "2006-05-03T10:30:45Z". If you do not specify the timezone, the system
uses the timezone of the server. |
String |
expirationDateTime |
Specifies the expiration date for the job, in the format
"2006-05-03T10:30:45-0000". The "-0000" section of the expirationDateTime
parameter value represents the timezone You can specify Z as a shortcut for Greenwich Mean
Time (GMT), such as "2006-05-03T10:30:45Z". If you do not specify the timezone, the system
uses the timezone of the server. |
String |
executionWindow |
Specifies the recurring interval for the job. |
String |
executionWindowUnit |
Specifies the recurring interval unit of measure for the value set by the
executionWindow parameter. Specify DAILY to run the job daily, WEEKLY to run the
job weekly, MONTHLY to run the job monthly, YEARLY to run the job annually, or
CONNECTION to run the job each time the node connects and polls for jobs. |
String |
email |
Specifies the email address that the system sends job notifications to. |
String |
The following example submits a job to start an application server. The following command example
submits the start application job, and sets the returned job token to the
MyStartJob
variable:
myStartJob = AdminTask.submitJob('-jobType startApplication -targetList [MyNode01] -jobParams
[applicationName myApplication] -email admin@company.com')
- Optional:
Monitor the job status.
Use the getOverallJobStatus command to display the status of the job, as the following example
displays:
AdminTask.getOverallJobStatus('[-jobTokenList [myStartJob]]')
If
you did not set the myStartJob variable in the previous step, specify the return value from the
submitJob command for the -jobTokenList parameter.
The command returns job status information for the job or jobs of interest. The system displays
the following information in the overall job status:
- The STATE attribute specifies the current state of the job.
- The TOTAL_RESULTS attribute specifies the total number of jobs.
- The DISTRIBUTED attribute specifies the number of distributed jobs.
- The ASYNC_IN_PROGRESS attribute specifies the number of asynchronous jobs in progress.
- The SUCCEEDED attribute specifies the number of successful jobs.
- The PARTIALLY_SUCCEEDED attribute specifies the number of partially successful jobs. Partial
success can occur, for example, when a node represents multiple servers, and only some of the
servers on the node complete successfully.
- The FAILED attribute specifies the number of failed jobs.
- The REJECTED attribute specifies the number of rejected jobs.
- The NOT_ATTEMPTED attribute specifies the number of jobs that the system has not attempted.
What to do next
Submit additional administrative jobs to the job manager and monitor existing jobs. You can also
schedule future administrative jobs.