+

Search Tips   |   Advanced Search

AdministrativeJobs (AdminTask)

We can use the Jython scripting language to configure and manage administrative jobs with wsadmin.sh.

Use the following commands to manage administrative jobs for the job manager:


deleteJob

The deleteJob command deletes an existing job from the job manager. If the job is running when you invoke the command, the system still returns the job results whether or not the job is deleted.

Target object: None.

Required parameters

-jobToken

Unique identifier of the job to delete. (String, required)

Return value

The command does not return output.

Batch mode example usage

Interactive mode


getJobTargets

The getJobTargets command displays the target for a job of interest. The target that the command returns for a job might be unenrolled or deleted.

Target object

None.

Required parameters

-jobToken

Unique identifier of the job of interest. (String, required)

Return value

The command returns the node name for the targets for the job of interest.

Batch mode example usage

Interactive mode


getJobTargetStatus

The getJobTargetStatus command displays the most recent job target status for the job of interest.

Target object: None.

Required parameters

-jobToken

Unique identifier of the job of interest. (String, required)

Optional parameters

-targetList

List of target node names. (String [ ], optional)

Return value

The command returns the most recent job status for the targets. The status might be: NOT_ATTEMPTED, DISTRIBUTED, ASYNC_IN_PROGRESS, SUCCEEDED, PARTIALLY_SUCCEEDED, FAILED, DELAYED, or REJECTED.

Batch mode example

Interactive mode


getJobTargetHistory

The getJobTargetHistory command displays the job target history for the job of interest.

Target object: None.

Required parameters

-jobToken

Unique identifier of the job of interest. (String, required)

-target

Node name of the target of interest. (String, required)

-maxReturn

Maximum number of results to return. (Integer, required)

Optional parameters

-startingTime

Time from which the command returns the job target history. (String, optional)

-endingTime

Time at which the command stops returning the job target history. (String, optional)

-ascending

Whether to return the results in ascending or descending order. Specify true to display the results in ascending order, or specify false to display the results in descending order. (Boolean, optional)

Return value

The command returns a list of attributes, where the first attribute specifies the number of matches, and the second attribute specifies the history of the job on the target. Each list contains the timestamp, status, message, and result attributes.

Batch mode example

Interactive mode


getJobTypes

The getJobTypes command displays the supported job types for an endpoint of interest.

Target object: None.

Optional parameters

-targetList

List of node names for the target. (String [ ], optional)

-group

Name of the group for the target. (String, optional)

Return value

The command returns a list of job types that each specified target supports.

Batch mode example usage

Interactive mode


getJobTypeMetadata

The getJobTypeMetadata command displays the metadata that is associated with a specific job type.

Target object: None.

Required parameters

-jobTypeList

List of job types of interest. (String [ ], optional)

Return value

The command returns a list of attributes, including the name, label, description, job-properties, and job-parameters attributes.

Batch mode example usage

Interactive mode


getOverallJobStatus

The getOverallJobStatus command displays the overall job status for a specific job or a list of jobs of interest.

Target object: None.

Optional parameters

-jobTokenList

Specifies a one or more of the unique identifiers of the jobs of interest. (String [ ], optional)

Return value

The command returns job status information for the job or jobs of interest. The REJECTED attribute specifies the number of jobs that the job manager rejected and did not run. The system displays the following information in the overall job status:

Batch mode example

Interactive mode


queryJobs

The queryJobs command queries the job manager for each submitted job.

Target object

None.

Required parameters

-query

Search expression to use to query for jobs. (String, required)

Use the following guidelines when creating the job queries:

  • The query consists of a key, operator, and value, or a list of values. We can specify a single value or a list of values separated by a comma.

  • Separate multiple expressions with a space and the AND operator.

  • The following case sensitive keys are supported:

    jobToken

    Specifies the job token for a specific job to query.

    group

    Node group name to query.

    description

    Description of the job to query. If the description contains multiple words, format the description in single or double quotes such as description = "job description".

    activationDateTime

    Date and time that the system activates the job, such as 2006-05-03T10:30:45-0000. The -0000 section of the activationDateTime key value represents RFC 822 format. We can specify Z as a shortcut for Greenwich Mean Time (GMT), such as 2006-05-03T10:30:45Z. If we do not specify the time zone, the system uses the time zone of the server.

    expirationDateTime

    Date and time that the job expires, such as 2006-05-03T10:30:45-0000. The -0000 section of the activationDateTime key value represents RFC 822 format. We can specify Z as a shortcut for Greenwich Mean Time (GMT), such as 2006-05-03T10:30:45Z. If we do not specify the time zone, the system uses the time zone of the server.

    state

    State of the job. Valid values include ASYNC_IN_PROGRESS, SUCCEEDED, PARTIALLY_SUCCEEDED, FAILED, DELAYED, REJECTED, and NOT_ATTEMPTED.

    target

    Target node for a job. Use this key to return the jobs for a specific node. The command returns the jobs for the specific node and node groups that the node belongs to. We can only specify one targetID per query.

  • The following operators are supported:

    Character Value
    = Equal to. Specify that the value is null by using = NULL.
    != Not equal to. Specify that the value is not null by using != NULL
    > Greater than
    < Less than
    >= Greater than or equal to
    <= Less than or equal to

-maxReturn

Maximum number of matches to return. (Integer, required)

Return value

The command returns a list of attributes, where the first attribute specifies the number of matches the query produced, and the second attribute specifies a list of job tokens that match the query, as the following sample displays:

Batch mode example

Interactive mode


resumeJob

The resumeJob command resumes a previously started or suspended job.

Target object: None.

Required parameters

-jobToken

Unique identifier of the job of interest. (String, required)

Return value

The command does not return output.

Batch mode example usage

Interactive mode


submitJob

The submitJob command submits a new administrative job to the job manager.

Target object: None.

Required parameters

-jobType

Type of job to submit. (String, required)

Optional parameters

-group

Name of the group for the target. (String, optional)

-targetList

List of nodes to target. (String [ ], optional)

-jobParams

Necessary parameters for the job to submit. (Properties, optional)

-username

Username to use to submit the job when security is enabled. (String, optional)

-password

Password for the username to use to submit the job when security is enabled. (String, optional)

-description

Specifies a description for the job. (String, optional)

-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 RFC 822 format. We can specify "Z" as a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z". If we do not specify the time zone, the system uses the time zone of the server. (String, optional)

-expirationDateTime

Expiration date for the job. (String, optional)

-executionWindow

Recurring interval for the job. (String, optional)

-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, or YEARLY to run the job annually. Additionally, we can specify CONNECTION to run the job each time the node connects to the job manager to poll for jobs. When specified CONNECTION, do not set the executionWindow parameter. (String, optional)

-email

Email address that the system sends job notifications to. (String, optional)

Return value

The command returns a job token for the newly submitted job.

Batch mode example usage

Interactive mode


suspendJob

The suspendJob command suspends a job that was previously submitted.

Target object

None.

Required parameters

-jobToken

Unique identifier of the job to suspend. (String, required)

Return value

The command does not return output.

Batch mode example usage

Interactive mode

  • JobManagerNode (AdminTask)
  • ManagedNodeGroup (AdminTask) (deprecated)
  • ManagedNodeAgent (AdminTask)