Skip to main content

Update schedule

PUT 

/v2/schedules/:scheduleId

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).

Request

Path Parameters

    scheduleId string required

    Schedule ID.


    Example: asdLZtadYvn4mBZmm

Bodyrequired

  • name string | null nullable
    Example: my-schedule
  • isEnabled boolean | null nullable
    Example: true
  • isExclusive boolean | null nullable
    Example: true
  • cronExpression string | null nullable
    Example: * * * * *
  • timezone string | null nullable
    Example: UTC
  • description string | null nullable
    Example: Schedule of actor ...
  • actions object[]
    • type ScheduleActionType (string) required

      Type of action to perform when the schedule triggers.

      Possible values: [RUN_ACTOR, RUN_ACTOR_TASK]

    • actorId string required
      Example: jF8GGEvbEg4Au3NLA
    • runInput object
        anyOf
      • body string | null nullable
        Example: {\n "foo": "actor"\n}
      • contentType string | null nullable
        Example: application/json; charset=utf-8
    • runOptions object
        anyOf
      • build string | null nullable
        Example: latest
      • timeoutSecs integer | null nullable
        Example: 60
      • memoryMbytes integer | null nullable
        Example: 1024
      • restartOnError boolean | null nullable
        Example: false

Status 200

Response Headers
    {
    "data": {
    "id": "asdLZtadYvn4mBZmm",
    "userId": "wRsJZtadYvn4mBZmm",
    "name": "my-schedule",
    "cronExpression": "* * * * *",
    "timezone": "UTC",
    "isEnabled": true,
    "isExclusive": true,
    "description": "Schedule of actor ...",
    "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",
    "actions": [
    {
    "id": "c6KfSgoQzFhMk3etc",
    "type": "RUN_ACTOR",
    "actorId": "jF8GGEvbEg4Au3NLA",
    "runInput": {
    "body": "{\\n \"foo\": \"actor\"\\n}",
    "contentType": "application/json; charset=utf-8"
    },
    "runOptions": {
    "build": "latest",
    "timeoutSecs": 60,
    "memoryMbytes": 1024,
    "restartOnError": false
    }
    }
    ]
    }
    }