Updated on 2024-04-19 GMT+08:00

Creating a Custom Job

The custom job creation and step compilation capabilities are provided.

Scenarios

Create a custom job on Cloud Operations Center.

Precautions

Confirm and fill in the risk level of the operation according to the operation procedure.

Procedure

  1. Log in to COC.
  2. In the navigation pane on the left, choose Automated O&M and click Jobs.

    Figure 1 Job Management page

  3. Click Custom Jobs and click Create Job.

    Figure 2 Clicking Create Job

  4. Enter the basic job information, including the job name, enterprise project, description, and tag. You can create tags by following the instructions provided in Tag Management.

    Figure 3 Entering basic job information

  5. Select a job template. If no proper template is available, select Custom.

    Figure 4 Selecting a job template

  6. Orchestrate the job. Job orchestration includes global parameters and job steps.

    Figure 5 Orchestrating a job

  7. Click +Add Parameter to add global parameters. After setting the parameters, click OK.

    You can manually set the global parameters or obtain them from the parameter warehouse. If you select Custom, you need to enter the parameter name, preset value, and parameter description. If you select Parameter Warehouse, you need to select the region where the parameter is located, parameter name, and parameter association mode.
    Figure 6 Selecting Custom and adding global parameters
    Figure 7 Obtaining and adding Global parameters from the parameter warehouse
    Table 1 Parameter association modes

    Parameter Association Mode

    Description

    Use the current parameter value in all environments

    This parameter is used during job execution. The parameter value is that displayed in the parameter basic information when the parameter is added during job creation.

    Use the latest parameter value in the corresponding environment

    This parameter is used during job execution. The parameter value is the latest parameter value obtained from the parameter warehouse in real time.

  8. Click to add a new step.

    Figure 8 Adding a step

  9. Click the step name or to change the step name.

    Figure 9 Changing the step name

  10. If there are unnecessary steps, click to delete them.

    Figure 10 Deleting steps

  11. Click +Add Task to add a task for the step. After the task is added, click OK. After all tasks are added, click OK.

    Figure 11 Adding tasks

  12. Set the operation type of the current task. The operation types are classified into public atoms and customized atoms.

    • Public atoms: include control atoms and cloud service API atoms. Cloud service APIs support ECS operation atoms. For details, see ECS Operations.
    • Custom atoms: You can select a custom script type. After a custom script is created, a custom atom record is automatically registered.
    Figure 12 Selecting an operation type

  13. Based on the selected operation type, enter basic information such as the name and operation description, parameter information, and exception handling policy, and click OK.

    Figure 13 Setting task information

  14. After the job orchestration is complete, determine the risk level of the job based on the operation risks.

    Set the manual review policy for job. Manual review is enabled by default for a job whose risk level is high.

    If you select Shift for Reviewer, the users in the current schedule are reviewers. If you select Individual, some users are specified as reviewers.

    If Notification Mode is set, the review request will be sent to the reviewer through the specified channel.

    Figure 14 Advanced settings