---
title: CreateSchedule
source: https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/create-schedule
---

Creates a schedule for a workflow definition.

> #### 💡 TIP
>
> Number of schedules, and the minimum duration for a given schedule is defined at [Workflow System Limits](https://docs.newrelic.com/docs/workflow-automation/limitations-and-faq/workflow-limits).

## Input parameters

| Parameter        | Type   | Required | Description                                                                                            |
| ---------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------ |
| `scope`          | Object | Yes      | The account scope. Contains `id` (your account ID) and `type` (ACCOUNT).                               |
| `definition`     | Object | Yes      | The workflow definition to schedule. Contains `name` (workflow name) and `version` (workflow version). |
| `cronExpression` | String | Yes      | Cron expression defining the schedule frequency (e.g., `"0 0 * * *"` for daily at midnight).           |
| `timezone`       | String | Yes      | Timezone for the schedule (e.g., `"Asia/Kolkata"`, `"America/New_York"`).                              |
| `options`        | Object | No       | Optional configuration. Contains `logLevel` for controlling execution logging.                         |

### logLevel option

The `logLevel` option controls the amount of logging information generated during workflow execution.

**Available values:**

-   `NONE` (default): No log outputs will be generated.
-   `INFO`: Outputs step level information.
-   `DEBUG`: Adds an attribute to the step started logs with all the action step inputs, using the format `workflowAutomation.inputs.<inputName>: <inputValue>`.
-   `TRACE`: In addition to `DEBUG` output, adds an attribute to the step started logs with all the action step outputs, using the format `workflowAutomation.outputs.<outputName>: <outputValue>`.

## Sample request

Use the [Query Builder](https://one.newrelic.com/nerdgraph-graphiql?state=b8f3b3a9-8d3e-c03e-5da4-34b98a57ff8f) to create and edit a workflow. See [NerdGraph API explorer](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer).

```graphql
  mutation {
    workflowAutomationCreateSchedule(
      scope: {id: "12345678", type: ACCOUNT}
      definition: {name: "healthyHeartbeat", version: 1}
      cronExpression: "0 0 * * *"
      timezone: "Asia/Kolkata"
      options: {logLevel: DEBUG}
    ) {
      scheduleId
    }
  }
```

## Related topics [#related-topics]

[Workflow entity overview](https://docs.newrelic.com/docs/workflow-automation/manage-workflows/workflow-entity-overview)

Learn about cron expressions and scheduling workflows

[Get schedules](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/get-schedules)

List all schedules in your account

[Delete schedule](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/delete-schedule)

Remove a schedule when no longer needed

[Workflow limits](https://docs.newrelic.com/docs/workflow-automation/limitations-and-faq/workflow-limits)

Understand schedule frequency and count limits
