Updated on 2024-10-29 GMT+08:00

Execute Command

The atomic action can be used to execute a specific command.

Procedure

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

    Figure 1 Jobs

  3. Click the Custom Jobs tab and click Create Job.

    Figure 2 Clicking Create Job

  4. Enter the basic job information. You can follow the steps in section Managing Tags to create a tag. After the required parameters are set, click Next.

    Figure 3 Entering basic job information

  5. Select a job template. If no proper template is available, click Customize, and click Next.

    Figure 4 Selecting a job template

  6. Perform job orchestration. Click + Add Task, and click + Operation Type. On the displayed dialog box, click Execute Command.

    Figure 5 Adding tasks

  7. Enter the task name and operation description.

    Figure 6 Setting the basic information

  8. Click Input, set commandType (Command type) to SHELL, PYTHON, or BAT as required. Set executeUser (command execution os user), timeout (Command execution timeout (second), successRate (Success rate (%)), commandContent (Command content), and commandParams (Command execute inputs).

    Figure 7 Adding input information

  9. Click Troubleshooting and configure the policy for the action upon an execution error: Terminate Job or Go to Next Step.

    Figure 8 Adding troubleshooting policy

  10. Click OK.