This command retrieves information about, cancels, deletes, or updates properties for one or more tasks (jobs).
tasks -h
tasks [-j <task_ID_list] [-c <Boolean>]
tasks -a cancel -j <task_ID_list>
tasks -a create -u <properties_JSON>
tasks -a delete -j <task_ID_list>
tasks -a update -u <properties_JSON>
tasks -t <template>
If no parameters are specified, this command retrieves information about all jobs.
cancel. Cancels the specified tasks.
create. Creates a task.
delete. Cancels the specified tasks.
update. Updates the job state and percent complete for the specified task.
true. (default). Returns information about subtasks.
false. Does not return information about subtasks.
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
args | Optional | Array of strings | List of arguments to include in the job title | ||
cancelRESTBody | Required when cancelRESTMethod is PUT or POST | Object | JSON formatted request body that is required to cancel the job, specified as a key-value pairs | ||
cancelRESTMethod | Required when cancelURL is specified | String | REST method to cancel the job. This can be one of the following
values.
|
||
cancelURL | Optional | String | URL to cancel the job | ||
children | Required | Array of objects | Information about each subtask in the job (task) The attributes in this object are the same as the top-level attributes. |
||
createdBy | Required | String | ID of the user that created the subtask. To obtain the user ID, see the GET /userAccounts REST API. | ||
createDate | Required | String | Date and time that the job was created | ||
customUid | Optional | String | User-defined job ID The response body associates the user-defined job ID with the job UID that is assigned by XClarity Administrator. |
||
endDate | Optional | String | Date and time that the job completed | ||
expirationTimeOut | Required when cancelURL is specified | Integer | Number of seconds after which the job expires. Use -1 for jobs that do not expire. | ||
jobCategory | Required | String | Subtask category. This can be one of the following values.
|
||
jobState | Required | String | State of the job. This can be one of the following values.
|
||
jobSummary | Required | Object | Information about the job summary A job summary
consists of the following attributes:
The job summary is optional for a job that completes successfully; however, it is good practice to set the summary, even when the severity is informational. |
||
actionArgs | Optional | Array of strings | List of arguments (variables) to include the recovery actions | ||
actionBundleKey | Required | String | Key for the recovery actions in the translated message.properties file | ||
actionBundleName | Required | String | Name of the translated message.properties file that contains the recovery actions | ||
actionText | Required | String | Recovery actions to use if there is no translation The actions
can be simple text or formatted text (such as paragraphs, ordered
lists, and bold text) using an array of JSON objects with the following
attributes.
For example:
|
||
descriptionArgs | Required | Array of strings | List of arguments (variables) to include the message description | ||
descriptionBundleKey | Required | String | Key for the message description in the translated message.properties file | ||
descriptionBundleName | Required | String | Name of the translated message.properties file that contains the message description | ||
descriptionText | Required | String | Message description to use if there is no translation The
description can be simple text or formatted text (such as paragraphs,
ordered lists, and bold text) using an array of JSON objects with
the following attributes.
For example:
|
||
severity | Required | String | Severity of the job. This can be one of the following values.
|
||
jobTitle | Required | String | Job title to use if there is no translation | ||
jobTitleBundle | Required | String | Location of the message.properties file where
the job title can be found if it is not located in the default task-management
properties file. The key that identifies the job title in the properties file. |
||
jobTitleKey | Required | String | Key that identifies the job title in the message.properties file | ||
logs | Required | Array of objects | Information about each log entry | ||
args | Optional | Array of strings | Arguments of the message | ||
logBundleName | Required | String | Location where messages.properties can be found if it is not located in the default task-management properties file | ||
logBundleKey | Required | String | Key that identifies the job title in the message.properties file | ||
logDate | Optional | String | Log date | ||
logText | Required | String | User-defined log text | ||
severity | Required | String | Severity of this log. This can be one of the following values.
|
||
percentage | Optional | String | Percentage complete of the subtask. This can be an integer from 0 - 100. | ||
predefinedUid | Optional | String | Job ID that is defined by the component that requested the job | ||
rebootPersistet | Optional | Boolean | Indicates whether an active job persists after a reboot. This
can be one of the following values.
|
||
startDate | Optional | String | Date and time that the job started | ||
stoppedBy | Optional | String | ID of the user that stopped the job | ||
targetUUID | Required | String | ID of the device that is the target for the job. | ||
uid | Optional | String | Job ID | ||
weight | Optional | String | Weight of the job, which is used to update the percent complete Jobs that take a long time to complete have a higher weight than fast jobs. |
{
"children": [],
"createdBy": "ADMIN",
"createDate": "2019-02-27T16:26:01Z",
"jobCategory": "Configuration",
"jobState": "Running",
"jobSummary": {
"actionBundleKey": "",
"actionBundleName": "",
"actionText": "",
"descriptionArgs": [],
"descriptionBundleKey": "",
"descriptionBundleName": "",
"severity": ""
},
"jobTitle": "",
"jobTitleBundle": "com.lenovo.lxca.profile.mri.ConfigurationPatternsMRI",
"jobTitleKey": "SERVER_PROFILE_JOB_NAME",
"logs": [{
"logBundleKey": "",
"logBundleName": "",
"logText": "",
"severity": ""
}],
"targetUUID": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
}
Parameter | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
jobUID | Required | String | Job ID | ||
jobState | Optional | String | Job state. This can be one of the following
values.
|
||
percentage | Optional | Integer | Percentage complete |
[{
"jobUID": "127"
"jobState": "Validating",
"percentage": 95
}]
connect --url https://192.0.2.0 --user ADMIN -noverify
tasks –j 127
connect --url https://192.0.2.0 --user ADMIN -noverify
tasks –j 127 –c false
connect --url https://192.0.2.0 --user ADMIN -noverify
tasks –a cancel –j 127, 140
connect --url https://192.0.2.0 --user ADMIN -noverify
tasks –a cancel –j 127
connect --url https://192.0.2.0 --user ADMIN -noverify
tasks –a update –u '[{"jobUID":"127","jobState":"Validating","percentage":50}, {"jobUID":"140",
"jobState":"Complete","percentage":100}]'