Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 2.21 KB

创建任务.md

File metadata and controls

50 lines (35 loc) · 2.21 KB

Create a task

A Thain Flow is composed of multiple jobs.

There are two ways to create a task, one is through page creation, and the other is created through the http interface.

Page creation

Open the editing page of Thain.

httpinterface creation

Reference java sdk

flowParameter description

Required parameters

  1. id: If you modify the required id of the task, you do not need to fill in the new task.
  2. name: flow name
  3. createUser: the user who created the task, if it is the page creation will get the current login user

Optional parameters

  1. cron: trigger flow according to cron timing, do not fill will not automatically trigger
  2. modifyCallbackUrl: Pause scheduling and continue scheduling will call back this address, post form, pause {"status":1}, continue {"status":2}
  3. pauseContinuousFailure: fill in the number, after pauseuseContinuousFailure times, pause the schedule
  4. emailContinuousFailure: mailbox, after the pauseContinuousFailure time, send a notification email
  5. callbackUrl: The task status changes the url of the callback, the post form starts executing {"code":1}, the execution fails {"code":3, "message": the reason for the failure}, the run succeeds {"code ": 2}
  6. "sla related":
    • slaKill: You can only fill in the truth temporarily.
    • slaDuration: flow runs for the longest number of seconds, the timeout will be killed
    • slaEmail: Mailbox for task timeout notification

job parameter description

Required parameters

  • name: job name, job name in a flow cannot be repeated
  • component: component name

Optional parameters

  • condition: If this job depends on other jobs, you need to fill in the job name here, multiple separated by &&
  • properties: component parameters, what needs to be filled out refer to specific components
  • callbackUrl: The job status changes the url of the callback, the post form starts executing {"code":1}, the execution fails {"code":3, "message": the reason for the failure}, the run succeeds {"code" : 2}