---
title: "Create a new schedule"
method: POST
path: "/v1/projects/{projectId}/schedules"
tags: ["Schedules"]
---

# Create a new schedule

`POST /v1/projects/{projectId}/schedules`

Create a new schedule for a specific project, pipeline and environment

## Path parameters

- `projectId` string, uuid, required

## Request body

- ScheduleRequest — Schedule request body for creating a new scheduled request for the pipeline
  - `pipeline` ScheduledPipelineExecutionRequest, required
    - `agentId` string — Optional agentId to execute the pipeline. If not specified the default agent for the provided environment will be used
    - `environmentName` string, required — Environment pipeline is published to
    - `gridVariables` object — Optional map of grid variable names to two-dimensional string arrays, used to override grid variable values for this execution without modifying the published pipeline definition
    - `pipelineName` string, required — Name of the pipeline to execute
    - `scalarVariables` object — Optional map of scalar variable names to their override values for this execution, without modifying the published pipeline definition
    - `versionName` string — Optional artifact version name of the pipeline to execute. If not specified the latest version will be executed
  - `schedule` ScheduleRequestDetails, required — Schedule request body for creating a new scheduled request
    - `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.
    - `cronExpression` string, required — This is a cronExpression must be provided for a schedule. This should be cronExpression in the Quartz format.
    - `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.
    - `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
    - `name` string, required — The user provided name for the schedule
    - `scheduleEnabled` boolean — An optional enabled boolean flag for whether the schedule should be enabled. This defaults to true if not specified.

## Response `201`

Schedule created

- ScheduleResponse
  - `scheduleId` string — The generated unique schedule Id used to identify a specific schedule

## Other responses

- `400` — Wrong request parameters used
- `401` — Forbidden
- `403` — Unauthorized
- `404` — Pipeline not Found
- `500` — Unexpected error occurred
- `504` — Gateway timeout

---

[API](https://skmtc.net/maia/apis/maia-public-rest-api.md) · [All operations](https://skmtc.net/maia/apis/maia-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia/maia-public-rest-api/versions/6239825f68eb/schema)
