Schedules
Update schedule
Updates a schedule using values specified by a schedule object passed as JSON in the POST payload. If the object does not define a specific property, its value will not be updated.
The response is the full schedule object as returned by the Get schedule endpoint.
The request needs to specify the Content-Type: application/json HTTP header!
When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL. (More info).
put/v2/schedules/{scheduleId}
Path parameters
scheduleIdstring required
Example:asdLZtadYvn4mBZmm
Schedule ID.
Request body
Example request
{
"name": "my-schedule",
"isEnabled": true,
"isExclusive": true,
"cronExpression": "* * * * *",
"timezone": "UTC",
"description": "Schedule of actor ...",
"actions": [
{
"actorId": "jF8GGEvbEg4Au3NLA",
"runInput": {
"body": "{\\n \"foo\": \"actor\"\\n}",
"contentType": "application/json; charset=utf-8"
},
"runOptions": {
"build": "latest",
"timeoutSecs": 300,
"memoryMbytes": 1024,
"maxItems": 1000,
"maxTotalChargeUsd": 5
}
}
]
}Response
Example response
{
"data": {
"id": "asdLZtadYvn4mBZmm",
"userId": "wRsJZtadYvn4mBZmm",
"name": "my-schedule",
"cronExpression": "* * * * *",
"timezone": "UTC",
"isEnabled": true,
"isExclusive": true,
"createdAt": "2019-12-12T07:34:14.202Z",
"modifiedAt": "2019-12-20T06:33:11.202Z",
"nextRunAt": "2019-04-12T07:34:10.202Z",
"lastRunAt": "2019-04-12T07:33:10.202Z",
"description": "Schedule of actor ...",
"notifications": {
"email": true
},
"actions": [
{
"id": "c6KfSgoQzFhMk3etc",
"actorId": "jF8GGEvbEg4Au3NLA",
"runInput": {
"body": "{\\n \"foo\": \"actor\"\\n}",
"contentType": "application/json; charset=utf-8"
},
"runOptions": {
"build": "latest",
"timeoutSecs": 300,
"memoryMbytes": 1024,
"maxItems": 1000,
"maxTotalChargeUsd": 5
}
}
]
}
}