Skip to main content
PATCH
/
v1
/
projects
/
{projectId}
/
schedules
/
{scheduleId}
Update the schedule by the given schedule id and schedule request
curl --request PATCH \
  --url https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/schedules/{scheduleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cronExpression": "0 * * ? * * *",
  "cronTimezone": "Europe/Dublin",
  "effectiveFrom": "2022-05-19T12:37:44.000Z",
  "name": "Nightly database backup",
  "scheduleEnabled": false
}
'
{
  "cronExpression": 0,
  "cronTimezone": "Europe/Dublin",
  "effectiveFrom": "2022-05-19T12:37:44.000Z",
  "environmentName": "Dev Environment",
  "gridVariables": {
    "grid1": [
      [
        "col1",
        "col2",
        "col3"
      ],
      [
        "col1a",
        "col2a",
        "col3a"
      ]
    ]
  },
  "intervalExpression": {
    "interval": 123,
    "unit": "<string>"
  },
  "lastRunAt": "2022-06-30T01:14:00.000Z",
  "name": "Nightly database backup",
  "nextRunAt": "2022-06-30T01:15:00.000Z",
  "pipelineName": "Nightly database backup",
  "scalarVariables": {
    "variable1": "value1",
    "variable2": "value2"
  },
  "scheduleEnabled": false,
  "scheduleId": "a2239897-51f8-4c09-83ab-0b2c28bd5a37",
  "versionName": "1.2.0"
}

Authorizations

Authorization
string
header
required

a valid bearer token

Path Parameters

projectId
string<uuid>
required
scheduleId
string<uuid>
required

Body

application/json

Schedule request body for creating a new scheduled request

cronExpression
string
required

This is a cronExpression must be provided for a schedule. This should be cronExpression in the Quartz format.

Example:

0

name
string
required

The user provided name for the schedule

Example:

"Nightly database backup"

allowConcurrentExecutions
boolean

An optional boolean flag for whether the scheduled pipeline should be allowed to execute concurrently. If set to false the pipeline will not be executed if it is already running. This defaults to true if not specified.

Example:

false

cronTimezone
string

An optional timezone region value to use with the schedule expression.

If a timezone region is provided, it will be used to in combination with the cronExpression to determine the schedule run times in the specified timezone region.

If no value is specified then this be set to UTC Zulu time to indicate +00:00 from the UTC Offset.

Example:

"Europe/Dublin"

effectiveFrom
string<date-time>

An optional date time value for when the schedule should start to run. If no value is specified then the effective from time will be set to when the schedule is created.

If a effective from time is specified, this should be specified in the offset date time format as per ISO 8601. It should include an offset from UTC, specifying how far ahead or behind UTC the specified time is.

The format of the date time will be one of the following:

  • "yyyy-MM-dd'T'HH:mm:ss+hh:mm" to represent a time ahead of UTC by +hh:mm
  • "yyyy-MM-dd'T'HH:mm:ss-hh:mm" to represent a time behind of UTC by -hh:mm
  • "yyyy-MM-dd'T'HH:mm:ssZ" to represent a time in UTC

For example 2022-01-01T12:00:00+02:00 represents two hours ahead of UTC time 2022-01-01T10:00:00Z

Example:

"2022-05-19T11:37:44.024Z"

scheduleEnabled
boolean

An optional enabled boolean flag for whether the schedule should be enabled. This defaults to true if not specified.

Example:

false

Response

Schedule updated successfully

cronExpression
string

Either an intervalExpression or cronExpression must be present for a schedule. This this is formatted in the Quartz format.

Example:

0

cronTimezone
string

The timezone region value used to determine in what timezone the CronExpression is applied.

It will be used to in combination with the cronExpression to determine the schedule run times in the specified timezone region.

Example:

"Europe/Dublin"

effectiveFrom
string<date-time>
A date time value specifying at what point the schedule becomes effective, before this time
the schedule will not run.

The format of the date time will be yyyy-MM-dd'T'HH:mm:ssZ and is always returned in UTC
Example:

"2022-05-19T12:37:44.000Z"

environmentName
string

The environment name to run the pipeline that the schedule is associated with

Example:

"Dev Environment"

gridVariables
object

The map of grid variables to be overridden when ETL pipeline is executed

Example:
{
"grid1": [
["col1", "col2", "col3"],
["col1a", "col2a", "col3a"]
]
}
intervalExpression
object

Either an intervalExpression or cronExpression must be present for a schedule. This intervalExpression details the interval between each scheduled run.

lastRunAt
string<date-time>

A datetime value for when the schedule last ran.

The format of the date time will be yyyy-MM-dd'T'HH:mm:ssZ and is always returned in UTC

Example:

"2022-06-30T01:14:00.000Z"

name
string

An optional name for the schedule, if not provided then it will constructed from pipelinename_environment_currentTimestamp

Example:

"Nightly database backup"

nextRunAt
string<date-time>

A datetime value for when the schedule should next run.

The format of the date time will be yyyy-MM-dd'T'HH:mm:ssZ and is always returned in UTC

Example:

"2022-06-30T01:15:00.000Z"

pipelineName
string

Name of the pipeline that the schedule is associated with

Example:

"Nightly database backup"

scalarVariables
object

The map of scalar variables to be overridden when ETL pipeline is executed

Example:
{
"variable1": "value1",
"variable2": "value2"
}
scheduleEnabled
boolean

An enabled boolean flag for whether the schedule is enabled.

Example:

false

scheduleId
string

The generated unique schedule Id used to identify a specific schedule

Example:

"a2239897-51f8-4c09-83ab-0b2c28bd5a37"

versionName
string

Optional artifact version name of the pipeline that the schedule is associated with

Example:

"1.2.0"