AI开发平台MODELARTS-创建工作流定时调度:请求示例

时间:2024-04-30 18:34:11

请求示例

创建workflow定时调度。设置类型为“time”,动作为“run”,调度策略on_failure为“retry”、on_running为“cancel”。

POST https://{endpoint}/v2/{project_id}/workflows/{workflow_id}/schedules

{
  "type" : "time",
  "action" : "run",
  "content" : {
    "cron" : "0 0 0 * * Thu",
    "method" : "fixed"
  },
  "policies" : {
    "on_failure" : "retry",
    "on_running" : "cancel"
  }
}
support.huaweicloud.com/api-modelarts/CreateWorkflowSchedule.html