Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Administer jobs in a flexible management environment using wsadmin.sh


Run administrative jobs using wsadmin.sh

Use this topic to submit and track administrative jobs in a flexible management environment using wsadmin.

Configure a job manager, admin agent, and register nodes and dmgrs with the job manager to set up a flexible management environment. We can optionally create management groups to simultaneously submit a job to multiple nodes.

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.

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

  1. Launch wsadmin.sh. Navigate to the WAS_HOME/bin directory and use the following command to connect wsadmin.sh to the job manager process:
    wsadmin -profileName myJobManager -lang jython
    
  2. 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.

    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:

    submitJob optional generic parameter descriptions. Specify optional parameters with a dash (-) before the parameter name.

    Parameter Description Type
    username Username to use to submit the job when security is enabled. String
    password Password for the username to use to submit the job when security is enabled. String
    description Specifies a description for the job. String
    activationDateTime 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. We 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 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 We 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 Recurring interval for the job. String
    executionWindowUnit 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 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')
    

  3. Optional: Monitor the job status.

    Use the getOverallJobStatus command to display the status of the job...

    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. We can also schedule future administrative jobs.
Register nodes with the job manager using commands


Related


AdministrativeJobs command group using wsadmin.sh
ManagedNodeAgent command group using wsadmin.sh
JobManagerNode command group using wsadmin.sh

+

Search Tips   |   Advanced Search