---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Create a Run schedule rule.

Create a new run schedule rule.

In order to create a run schedule rule, the user must have `workspaces:set-schedule`
permission.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "RunScheduleRule": {
        "description": "A RunScheduleRule resource represents a rule for scheduling runs in a workspace.\n\nEach RunScheduleRule is associated with a workspace and has a schedule and a schedule mode.\nThe schedule is a cron expression that determines when runs should be triggered.\nThe schedule mode determines whether the triggered run is an 'apply' 'destroy' or 'refresh' run.",
        "properties": {
          "attributes": {
            "properties": {
              "schedule": {
                "description": "Cron expression for scheduled runs. Time should be in UTC.",
                "maxLength": 255,
                "type": "string"
              },
              "schedule-mode": {
                "description": "Mode of the scheduled run.",
                "enum": [
                  "apply",
                  "destroy",
                  "refresh"
                ],
                "type": "string"
              }
            },
            "required": [
              "schedule",
              "schedule-mode"
            ],
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "properties": {
              "self": {
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "relationships": {
            "properties": {
              "workspace": {
                "description": "Workspace in which new runs will be created.",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "workspaces",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": {
            "enum": [
              "run-schedule-rules"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "attributes"
        ],
        "type": "object"
      },
      "RunScheduleRuleDocument": {
        "description": "JSON:API Document.\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RunScheduleRule"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/run-schedule-rules": {
      "post": {
        "description": "Create a new run schedule rule.\n\nIn order to create a run schedule rule, the user must have `workspaces:set-schedule`\npermission.",
        "operationId": "create_run_schedule_rule",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/vnd.api+json": {
              "schema": {
                "$ref": "#/components/schemas/RunScheduleRuleDocument"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScheduleRuleDocument"
                }
              }
            },
            "description": "Successfully created."
          },
          "403": {
            "description": "Missing required permissions."
          },
          "404": {
            "description": "Relationship not found, or user unauthorized to perform action."
          },
          "422": {
            "description": "Malformed request body (missing attributes, wrong types, etc.)"
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Create a Run schedule rule.",
        "tags": [
          "run-schedule-rules"
        ],
        "x-resource": "RunScheduleRule",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [List all run schedule rules.](https://docs.scalr.io/scalr/reference/list_schedule_rules.md)
* [Delete a Schedule Rule.](https://docs.scalr.io/scalr/reference/delete_run_schedule_rule.md)
* [Get a Run schedule rule.](https://docs.scalr.io/scalr/reference/get_run_schedule_rule.md)
* [Update a Run schedule rule.](https://docs.scalr.io/scalr/reference/update_run_schedule_rule.md)