{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yunqi/json-schema/yunqi-task-config-save-request-schema.json",
  "title": "TaskConfigSaveRequest",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yunqi-scheduletask-api-openapi.yml#/components/schemas/TaskConfigSaveRequest",
  "type": "object",
  "properties": {
    "taskId": {
      "type": "integer",
      "format": "int64"
    },
    "retryIntervalTime": {
      "type": "integer",
      "title": "重试间隔时间,单位秒",
      "format": "int64"
    },
    "retryCount": {
      "type": "integer",
      "title": "重试次数",
      "format": "int32"
    },
    "rerunProperty": {
      "type": "string",
      "title": "出错是否重跑",
      "enum": [
        "ALL_ALLOWED",
        "FAILURE_ALLOWED",
        "ALL_DENIED"
      ],
      "description": "枚举说明：\n- `ALL_ALLOWED`: 运行成功或失败后皆可重跑\n- `FAILURE_ALLOWED`: 运行成功后不可重跑，运行失败后可以重跑\n- `ALL_DENIED`: 运行成功或失败皆不可重跑"
    },
    "selfDependsJob": {
      "type": "integer",
      "title": "自依赖属性，是否依赖自身上一个实例",
      "format": "int32",
      "enum": [
        0,
        1
      ],
      "x-enum-names": [
        "NO",
        "YES"
      ],
      "description": "枚举说明：\n- `0`: 不依赖自身上一周期实例\n- `1`: 依赖自身上一周期实例"
    },
    "priority": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "P0",
        "P1",
        "P2",
        "P3",
        "P4",
        null
      ],
      "title": "任务优先级，P1-P5"
    },
    "activeStartTime": {
      "type": "string",
      "title": "有效开始时间",
      "format": "date"
    },
    "activeEndTime": {
      "type": "string",
      "title": "有效结束时间",
      "format": "date"
    },
    "ownerId": {
      "type": "integer",
      "format": "int64",
      "title": "责任人"
    },
    "taskDescription": {
      "type": "string",
      "title": "任务描述"
    },
    "scheduleCreatedType": {
      "type": "string",
      "enum": [
        "SECOND_DAY",
        "CURRENT_DAY"
      ],
      "title": "调度产生类型(1: T+1 2: T+0 )"
    },
    "scheduleConfigType": {
      "type": "string",
      "enum": [
        "COMMON_SCHEDULE",
        "EMPTY_RUN",
        "STOP"
      ],
      "title": "调度类型，正常调度/空跑/暂停"
    },
    "cronExpress": {
      "type": "string",
      "title": "cron表达式"
    },
    "executeTimeout": {
      "type": "integer",
      "format": "int64",
      "title": "执行超时时间,单位小时"
    },
    "executeParams": {
      "type": [
        "object",
        "null"
      ],
      "properties": {},
      "title": "调度参数，Map/json的kv格式,key:变量名,value:变量值",
      "additionalProperties": {
        "type": "string"
      }
    },
    "dataTaskInputList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataTaskInput"
      },
      "title": "文件输入依赖"
    },
    "ext": {
      "type": [
        "object",
        "null"
      ],
      "properties": {},
      "additionalProperties": {
        "type": "string"
      }
    },
    "workspace": {
      "type": [
        "string",
        "null"
      ],
      "title": "工作空间"
    },
    "schema": {
      "type": [
        "string",
        "null"
      ],
      "title": "schema"
    },
    "vcCode": {
      "type": [
        "string",
        "null"
      ],
      "title": "vc计算资源"
    },
    "tenantId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "title": "账号ID"
    },
    "userId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "title": "用户ID"
    },
    "instance": {
      "type": [
        "string",
        "null"
      ],
      "title": "实例名"
    },
    "collectType": {
      "type": [
        "integer",
        "null"
      ],
      "title": "作业类型",
      "description": "1:普通作业, 2:复合任务子节点"
    },
    "nodeId": {
      "type": [
        "integer",
        "null"
      ],
      "title": "节点ID",
      "format": "int64"
    }
  },
  "required": [
    "taskId",
    "retryCount",
    "retryIntervalTime",
    "activeEndTime",
    "activeStartTime",
    "selfDependsJob",
    "taskDescription",
    "cronExpress",
    "rerunProperty",
    "workspace",
    "instance"
  ],
  "$defs": {
    "DataTaskInput": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "integer",
          "format": "int64"
        }
      }
    }
  }
}