---
title: "Schedule a data loading process"
method: POST
path: "/gdc/projects/{projectId}/schedules"
tags: ["schedules"]
---

# Schedule a data loading process

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

## Request

- Base URL: `https://secure.gooddata.com`
- URL: `https://secure.gooddata.com/gdc/projects/{projectId}/schedules`
- Auth: none declared

After you have deployed your processes to your GoodData project, you can schedule execution of them.</br>
</br>
This API call creates schedules for both **regular** and **ADD** data loading processes.
For more information about Automated Data Distribution (ADD), see [Automated Data Distribution](https://help.gooddata.com/display/doc/Automated+Data+Distribution). </br>

You can also schedule a data loading process via the [Data Integration Console](https://help.gooddata.com/display/doc/Schedule+a+Process+on+the+Data+Integration+Console).

</br>

 **Schedule properties:** </br>

* `name` (string) - The name of the schedule
* `type` (string) - The type of the process; always set to MSETL
* `state` (string) - The state of the process; can be ENABLE or DISABLE
* `timezone` (string) - Affects all times related to the scheduling
* `reschedule` (number) - The number of minutes after which a schedule is rescheduled when the last execution ended with a status of ERROR
* `cron` (string) - The expression that defines when the schedule will be executed
* `triggerScheduleId` (string) - ID of the schedule that will trigger execution of this schedule</br>
    **NOTE:** You can set either `cron` or `triggerScheduleId`, not both.
    If neither `cron` nor `triggerScheduleId` is set, the schedule does not run at any specified time and can be executed [only manually](https://help.gooddata.com/display/doc/Scheduling+a+Process+for+Manual+Execution+Only): via the [Data Integration Console](https://help.gooddata.com/display/doc/Running+Schedules+On-Demand) or the [API](#operation/executeSchedule).
* `params` (object) - Schedule parameters set for specific purposes
    * Common parameters
        * `PROCESS_ID` (string) - ID of the process
    * For ADD (Automated Data Distribution) processes only
        * `GDC_DATALOAD_DATASETS` (array) - Specifies datasets to import data to. For example:
            `[{"dataset":"dataset.productDetails","uploadMode":"FULL"},{"dataset":"dataset.sales","uploadMode":"INCREMENTAL"}]`
            In this example, the data of the dataset `sales` is uploaded in mode `INCREMENTAL`, and the data of the dataset `productDetails` is uploaded in mode `FULL`.
        * `GDC_DE_SYNCHRONIZE_ALL` (string) - If `true`, uploads data to all mapped datasets at runtime. Otherwise, uploads data to the datasets specified in the `DATALOAD_DATASETS` parameter.
        * `queryParallelism` (number) - Specifies how many queries will be executed in parallel. If not set, defaults to 1, which means that datasets will be uploaded one by one sequentially.</br>
            **NOTE:** This parameter is in beta release. Use it with caution. Currently, the only supported value apart from the default is 2 (two datasets are uploaded in parallel, which speeds up the uploading process).
            To override this parameter in a schedule during its execution, set it explicitly when using the [API for executing a schedule](#operation/executeSchedule).
    * For CloudConnect and Ruby processes
        * `EXECUTABLE` (string) - The path to the graph or Ruby script
        * `OPTIONAL_PARAM` (string) - Any optional parameter with any name used as input for a running graph or Ruby script
* `hiddenParams` (object) - Optional parameters used to pass sensitive information (for example, passwords)</br>


This is a sample request for creating a process of the ETL type (Automated Data Distribution v2).
```
{
    "schedule" : {
        "type" : "MSETL",
        "timezone" : "UTC",
        "cron" : "0 15 27 7 *",
        "params": {
            "PROCESS_ID" : "{process_id}",
            "GDC_DATALOAD_DATASETS" : [
                {
                    "dataset": "dataset.example1",
                    "uploadMode": "FULL"
                },
                {
                    "dataset": "dataset.example2",
                    "uploadMode": "INCREMENTAL"
                }
            ],
            "GDC_DE_SYNCHRONIZE_ALL" : "false",
            "PARAM1_NAME" : "PARAM1_VALUE",
            "PARAM2_NAME" : "PARAM2_VALUE"
        },
        "hiddenParams" : {
            "HPARAM1_NAME" : "HPARAM1_VALUE",
            "HPARAM2_NAME" : "HPARAM2_VALUE"
        }
    }
}
```

## Request body

- Schedule1
  - `schedule` ScheduleCommon, required
    - `alias` string, nullable: The schedule alias
    - `name` string, nullable: descriptive name of schedule
    - `type` string, required: schedule type
    - `state` 'ENABLED' | 'DISABLED': schedule state
    - `param` object
    - `params` object
    - `hiddenParams` object
    - `cron` string, nullable: crontab expression
    - `triggerScheduleId` string, nullable: schedule id that will trigger this schedule execution
    - `triggerExecutionStatus` 'OK' | 'OK+WARNING', nullable: status trigger run-after
    - `timezone` string: timezone for cron DEFAULT: UTC
    - `reschedule` integer, nullable: reschedule in minutes for error state
    - `consecutiveFailedExecutionCount` integer: reset by successful execution / when re-enabling schedule

## Response `201`

Created - creates a new schedule

- Schedule
  - `schedule` ScheduleResponse, required
    - `alias` string, nullable: The schedule alias
    - `name` string, nullable: descriptive name of schedule
    - `type` string, required: schedule type
    - `state` 'ENABLED' | 'DISABLED': schedule state
    - `param` object
    - `params` object
    - `hiddenParams` object
    - `cron` string, nullable: crontab expression
    - `triggerScheduleId` string, nullable: schedule id that will trigger this schedule execution
    - `triggerExecutionStatus` 'OK' | 'OK+WARNING', nullable: status trigger run-after
    - `timezone` string: timezone for cron DEFAULT: UTC
    - `reschedule` integer, nullable: reschedule in minutes for error state
    - `consecutiveFailedExecutionCount` integer: reset by successful execution / when re-enabling schedule
    - `lastExecution` Execution
      - `execution` ExecutionResponse, required
        - `createdTime` string
        - `startTime` string
        - `endTime` string
        - `log` string
        - `proxyHost` string
        - `data` string: link to data created by the execution
        - `status` 'SCHEDULED' | 'RUNNING' | 'OK' | 'WARNING' | 'ERROR' | 'CANCELED' | 'TIMEOUT', required
        - `error` object
          - `errorCode` string, required
          - `message` string, required
          - `parameters` string[]
        - `trigger` 'CRON' | 'MANUAL'
        - `links` object
          - `self` string, required
    - `ownerLogin` string: internally (e.g. in mongo) the name is 'profileLogin'
    - `lastSuccessful` Execution
      - `execution` ExecutionResponse, required
        - `createdTime` string
        - `startTime` string
        - `endTime` string
        - `log` string
        - `proxyHost` string
        - `data` string: link to data created by the execution
        - `status` 'SCHEDULED' | 'RUNNING' | 'OK' | 'WARNING' | 'ERROR' | 'CANCELED' | 'TIMEOUT', required
        - `error` object
          - `errorCode` string, required
          - `message` string, required
          - `parameters` string[]
        - `trigger` 'CRON' | 'MANUAL'
        - `links` object
          - `self` string, required
    - `nextExecutionTime` string
    - `links` object
      - `executions` string, required: link to executions collection
      - `self` string, required

## Other responses

- `400`: Bad Request
- `404`: Not Found - the project doesn't exist

---

[API](https://skmtc.dev/gooddata/apis/gooddata-api-documentation.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/revisions/e5dc0ee6ab00?raw)
