Skip to main content

PUT /tasks/schedules/{job_id}

Use this method to modify a scheduled job (task).

Authentication

Authentication with username and password is required.

Request URL

PUT https://{management_server_IP}/tasks/schedules/{job_id}

where {job_id} is the ID of the scheduled job. To obtain the scheduled job IDs, use GET /tasks/schedules.

Query parameters

None

Request body

Table 1. Disabling, enabling, or running a scheduled job
AttributesRequired / OptionalTypeDescription
actionRequiredStringThe action to take. This can be one of the following values:
  • PAUSE. Disables the scheduled job. The job will not run at the next scheduled time.
  • PLAY. Enables the job to run at the next scheduled time.
  • RUN. Runs the job immediately.
The following example enables a schedule job.
{
"action ": "PLAY"
}
Table 2. Modifying a scheduled job.
AttributesRequired / OptionalTypeDescription
actionOptionalStringThe action to take. This can be one of the following values.
  • EDIT (default) Creates a scheduled job that can be run now.

componentUUIDsOptionalArray of stringsList of UUIDs of the devices or resource groups that are the target for the action.

To obtain the device and resource group IDs, use GET /chassis, GET /nodes, GET /storage, GET /switches, and GET /resourceGroups.

execDateRequired when schedule type is changed to ONE_TIMEString(ONE_TIME schedule types only) Timestamp when the scheduled job is to run next.
matchEverythingOptionalBooleanIndicates whether the action is to be run against all managed devices. This can be one of the following values.
  • true. The action is to be run against all managed devices

  • false. The action is run against only the managed device that is specified by the target attribute.

nameOptionalStringName of the scheduled job
ruleRequired when schedule type is changed to RECURRINGObject(RECURRING schedule types only) Information about the scheduling rules.
 dayOfWeekRequired when rule type is changed to weekly or monthly, or yearlyStringDay of each week when the job is to run. This can be one of the following values.
  • monday

  • tuesday

  • wednesday

  • thursday

  • friday

  • saturday

  • sunday

 daysRequired when rule type is changed to dailyArray of stringsDays when the job is to run. This can be one or more of the following values.
  • monday

  • tuesday

  • wednesday

  • thursday

  • friday

  • saturday

  • sunday

 endDateRequired when noEnd is changed to falseStringDate and time when the job stops running
 monthOfYearRequired when rule type is changed to yearlyStringMonth of each year when the job is to run. This can be one of the following values.
  • january

  • february

  • march

  • april

  • june

  • july

  • august

  • september

  • october

  • november

  • december

 noEndOptionalBooleanSpecifies whether the schedule has no end date. This can be one of the following values.
  • true. The schedule has no end date.

  • false. (default) The schedule has an end date.

 recurEveryOptional when rule type is changed to weekly, monthly, or yearlyIntegerInterval for running the job (for example, specify 2 for every two weeks).

The default is 1.

 startDateOptionalStringDate and time when the job starts running
 timeZoneOptionalStringTime zone for the schedule, for example, GMT-0.
 typeOptionalStringThe type of recurring schedule. This can be one of the following values.
  • daily

  • weekly

  • monthly

  • yearly

 weekOfMonthRequired when rule type is monthly or yearlyIntegerWeek of each month when the job is to run. This can be one of the following values
  • 1

  • 2

  • 3

  • 4

  • 5

eventFilterRequired when schedule type is changed to EVENT_TRIGGEREDObject(EVENT_TRIGGERED schedule types only) Information about the events that trigger the job to run
 eventIDOptionalStringA list of IDs, separated by a comma, for events that trigger the job to run.
 eventServiceOptionalArray of stringsThe service type. This can be one or both of the following values.
  • support

  • user

 eventClassOptionalArray of objectsInformation about the event class - severity mapping.
  nameOptionalStringThe name of the event class. This can be one of the following values.
  • ADAPTOR (adapter card)
  • AUDIT
  • BLADE (Flex System server)
  • COOLING
  • DISKS (storage)
  • EXPANSION (expansion card)
  • IOMODULE (Flex System switch)
  • MEMORY
  • OTHER
  • POWER
  • PROCESSOR
  • SWITCH (RackSwitch switch)
  • SYSTEM (rack or tower server)
  • TEST
  • UNKNOWN
  • OTHER
  • BACKPLANE
  • CHASSIS
  • DRIVE
  • EXTDRIVE. External drive
  • FAN
  • M2_ADAPTER
  • M2DRIVE
  • OCP
  • PCIE
  • PSU
  • RETIMER
  • RISER
  • _7MMDrive
  • PUMP
  severitiesOptionalArray of stringsList of severities that trigger the job to run. This can be one or more of the following values:
  • Unknown. Unknown severity.

  • Informational. Informational

  • Warning. User can decide if action is needed.

  • Minor. Action is needed, but the situation is not serious at this time.

  • Major. Action is needed now.

  • Critical. Action is needed now and the scope is broad (perhaps an imminent outage to a critical resource will result).

  • Fatal. A non-recoverable error has occurred.

scopeRequired when schedule type is changed to EVENT_TRIGGEREDObject(EVENT_TRIGGERED schedule types only) A date interval on which the event triggered scheduler will be active.
 startDateOptionalStringDate and time when the schedule starts, in the GMT-0 time zone.
 endDateRequired if noEnd is changed to trueStringDate and time when the schedule ends, in the GMT-0 time zone.
 noEndOptionalBooleanSpecifies whether the schedule has no end date. This can be one of the following values.
  • true. The schedule has no end date.

  • false. (default) The schedule has an end date.

triggerActionRequiredObjectInformation about the action to run on the target devices.
 idRequiredStringID of the action to run.

To obtain the action IDs, use GET /tasks/schedules/actions.

typeRequiredStringType of schedule. This can be one of the following values.
  • ONE_TIME. The job runs one time on all target devices. If the specified start and end date are in the past, the job runs imminently.
  • RECURRING. The job runs on the specified dates and times on all target devices.
  • EVENT_TRIGGERED. The job runs when a specified event occurs. This job runs only on the device that generated the event.
The following example modifies the specified schedule to run on a daily basis.
{
"componentIDs": ["784A050844A0E5119A9E008CFAE82560"],
"matchEverything": false,
"name": "Daily schedule",
"rule": {
"days": ["monday","wednesday"],
"endDate": "2017-10-27 18:39:00"
"startDate": "2017-10-18 18:39:00",
"timeZone": "Europe/Bucharest",
"type": "daily"
},
"triggerAction": {
"id": "ServiceDataCollect",
},
"type": "RECURRING"
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
404Not foundA specified resource cannot be found. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

None