Skip to main content

PATCH – Update Power Schedule Jobproperties

Use the PATCH method to update properties in Job resource for Redfish service

Request URL

GET https://<BMC_IPADDR>/redfish/v1/JobService/Jobs/{PowerOff, PowerOn, Restart}

Request body

Properties to be updated are shown as bellow, all of these properties can be changed individually.

FieldTypeDescription
ScheduleObjectThe schedule settings for this job.
 EnabledDaysOfWeekArrayExpand.
  EnabledDaysOfWeek[N]StringDays of the week when scheduled occurrences are enabled, for enabled days of the month and months of the year. If not present, all days of the week are enabled.
 InitialStartTimeDate-timeThe date and time when the initial occurrence is scheduled to occur.

Response body

The response returns same content as GET operation with updated properties.

Status code

HTTP Status CodeError Message ID
500InternalError

Example

The following example is PATCH body

{
"Schedule": {
"InitialStartTime": null,
"EnabledDaysOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
]
}
}

The following example JSON response is returned:

{
"MaxExecutionTime": null,
"JobStatus": "OK",
"Id": "Restart",
"@odata.id": "/redfish/v1/JobService/Jobs/Restart",
"HidePayload": true,
"Messages": [],
"PercentComplete": null,
"StepOrder": [],
"@odata.type": "#Job.v1_0_3.Job",
"JobState": "Suspended",
"Name": "Restart",
"@odata.etag": "\"41754a37fca8f52fe536e42dbcf4c544\"",
"Schedule": {
"RecurrenceInterval": null,
"InitialStartTime": null,
"EnabledDaysOfWeek@Redfish.AllowableValues": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
"Every"
],
"Name": "Lenovo:Restart",
"EnabledDaysOfWeek": []
},
"Description": "The resource is used to represent the settings of scheduled Restart actions for a Redfish implementation."
}