{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-automation/json-schema/microsoft-azure-automation-schedule-schema.json",
  "title": "Schedule",
  "description": "Definition of the schedule.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-automation-schedule-api-openapi.yml#/components/schemas/Schedule",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ScheduleProperties",
      "description": "Gets or sets the properties of the schedule.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "AdvancedSchedule": {
      "type": "object",
      "description": "The properties of the create Advanced Schedule.",
      "properties": {
        "weekDays": {
          "type": "array",
          "description": "Days of the week that the job should execute on.",
          "items": {
            "type": "string"
          }
        },
        "monthDays": {
          "type": "array",
          "description": "Days of the month that the job should execute on. Must be between 1 and 31.",
          "items": {
            "type": "integer",
            "format": "int32"
          }
        },
        "monthlyOccurrences": {
          "type": "array",
          "description": "Occurrences of days within a month.",
          "items": {
            "$ref": "#/$defs/AdvancedScheduleMonthlyOccurrence"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "AdvancedScheduleMonthlyOccurrence": {
      "type": "object",
      "description": "The properties of the create advanced schedule monthly occurrence.",
      "properties": {
        "occurrence": {
          "type": "integer",
          "format": "int32",
          "description": "Occurrence of the week within the month. Must be between 1 and 5"
        },
        "day": {
          "$ref": "#/$defs/ScheduleDay",
          "description": "Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday."
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "ScheduleDay": {
      "type": "string",
      "description": "Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.",
      "enum": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday",
        "Sunday"
      ],
      "x-ms-enum": {
        "name": "ScheduleDay",
        "modelAsString": true,
        "values": [
          {
            "name": "Monday",
            "value": "Monday",
            "description": "Monday"
          },
          {
            "name": "Tuesday",
            "value": "Tuesday",
            "description": "Tuesday"
          },
          {
            "name": "Wednesday",
            "value": "Wednesday",
            "description": "Wednesday"
          },
          {
            "name": "Thursday",
            "value": "Thursday",
            "description": "Thursday"
          },
          {
            "name": "Friday",
            "value": "Friday",
            "description": "Friday"
          },
          {
            "name": "Saturday",
            "value": "Saturday",
            "description": "Saturday"
          },
          {
            "name": "Sunday",
            "value": "Sunday",
            "description": "Sunday"
          }
        ]
      }
    },
    "ScheduleFrequency": {
      "type": "string",
      "description": "Gets or sets the frequency of the schedule.",
      "enum": [
        "OneTime",
        "Day",
        "Hour",
        "Week",
        "Month",
        "Minute"
      ],
      "x-ms-enum": {
        "name": "ScheduleFrequency",
        "modelAsString": true,
        "values": [
          {
            "name": "OneTime",
            "value": "OneTime",
            "description": "OneTime"
          },
          {
            "name": "Day",
            "value": "Day",
            "description": "Day"
          },
          {
            "name": "Hour",
            "value": "Hour",
            "description": "Hour"
          },
          {
            "name": "Week",
            "value": "Week",
            "description": "Week"
          },
          {
            "name": "Month",
            "value": "Month",
            "description": "Month"
          },
          {
            "name": "Minute",
            "value": "Minute",
            "description": "The minimum allowed interval for Minute schedules is 15 minutes."
          }
        ]
      }
    },
    "ScheduleProperties": {
      "type": "object",
      "description": "Definition of schedule parameters.",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the start time of the schedule."
        },
        "startTimeOffsetMinutes": {
          "type": "number",
          "format": "double",
          "description": "Gets the start time's offset in minutes.",
          "readOnly": true
        },
        "expiryTime": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Gets or sets the end time of the schedule."
        },
        "expiryTimeOffsetMinutes": {
          "type": "number",
          "format": "double",
          "description": "Gets or sets the expiry time's offset in minutes."
        },
        "isEnabled": {
          "type": "boolean",
          "description": "Gets or sets a value indicating whether this schedule is enabled."
        },
        "nextRun": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Gets or sets the next run time of the schedule."
        },
        "nextRunOffsetMinutes": {
          "type": "number",
          "format": "double",
          "description": "Gets or sets the next run time's offset in minutes."
        },
        "interval": {
          "description": "Gets or sets the interval of the schedule."
        },
        "frequency": {
          "$ref": "#/$defs/ScheduleFrequency",
          "description": "Gets or sets the frequency of the schedule."
        },
        "timeZone": {
          "type": "string",
          "description": "Gets or sets the time zone of the schedule."
        },
        "advancedSchedule": {
          "$ref": "#/$defs/AdvancedSchedule",
          "description": "Gets or sets the advanced schedule."
        },
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the creation time."
        },
        "lastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the last modified time."
        },
        "description": {
          "type": "string",
          "description": "Gets or sets the description."
        }
      }
    }
  }
}