Application management

更新时间:
复制 MD 格式

This topic describes how to create and manage applications for XXL-JOB task scheduling. It covers basic configurations, advanced settings, and integration methods.

Create an application

Before you can use XXL-JOB scheduled tasks, you must first create an application.

Step 1: Configure basic task settings

  1. Log on to the MSE XXL-JOB console, and select a region in the top navigation bar.

  2. In the left navigation bar, select Task Scheduling > XXL-JOB Edition.

  3. Click the name of the target instance. In the left-side navigation pane, click Application Management, and then click Create application.

  4. In the Create application panel, enter the AppName and Name, configure advanced settings as needed, and then click OK.

    Configuration Category

    Configuration Item

    Description

    Default Value

    Basic Application Information

    AppName

    A unique identifier that associates an executor with the application during registration. It must be globally unique.

    None

    Name

    The name of the application. Chinese and English are supported.

    None

    AccessToken

    The authentication token for executor registration. You can customize it or have the system generate it automatically. For security, we recommend using a different token for each application.

    None

    app type

    • Standard application: Requires an executor integrated using the XXL-JOB software development kit (SDK) for Java, Go, or Python.

    • HTTP application: Does not require SDK integration. Backend nodes are automatically discovered by configuring a domain name or a Kubernetes service. Scheduling uses the HTTP protocol. Requires engine version 2.3.0 or later.

    Standard application

    Advanced Application Configuration

    Flow Control

    Application-level traffic shaping. When enabled, you can set the task concurrency to prevent the application from becoming unresponsive. High-priority tasks are executed first.

    Off

    Job Execution Queue Size

    The maximum number of task instances that can run concurrently for an application. Task instances that exceed this limit are not discarded. They are placed in a queue to wait for execution.

    100

    Tag-based Routing Policy

    • If a task does not have a specified tag, schedule all machines.

    • If a task does not have a specified tag, schedule only untagged machines.

    For more information about how to add tags to an executor, see How to perform canary release for tasks using tag-based routing.

    If no tags are specified for a job, it is scheduled on all machines.

Step 2: Configure integration

After you create the application, find it in the application list. In the Actions column, click Access Configuration to view the integration configuration for the executor.

  • Access Method 1: Modify the Spring Boot Configuration File.

    xxl.job.admin.addresses=http://xxljob-xxxx.schedulerx.mse.aliyuncs.com
    xxl.job.accessToken=xxxxxxx
    xxl.job.executor.appname=xxxxxxx
  • Access Method 2: Restart the Application By Using the -D Parameter (No Modifications of Code and Configuration Files).

    java -Dxxl.job.admin.addresses=http://xxljob-xxxx.schedulerx.mse.aliyuncs.com
    -Dxxl.job.accessToken=xxxxxxx
    -Dxxl.job.executor.appname=xxxxxxx
    app.jar

Edit an application

  1. Log on to the MSE XXL-JOB console, and select a region in the top navigation bar.

  2. In the left navigation bar, select Task Scheduling > XXL-JOB Edition.

  3. Click the name of the target instance. In the left-side navigation pane, click Application Management. Find the target application and click Edit in the Actions column.

  4. In the Edit application panel, modify the Name, AccessToken, app type, Flow Control, and Collect Log settings, and then click OK.

Delete an application

You can delete an application if you no longer need it for XXL-JOB scheduled tasks.

  1. Log on to the MSE XXL-JOB console, and select a region in the top navigation bar.

  2. In the left navigation bar, select Task Scheduling > XXL-JOB Edition.

  3. Click the name of the target instance. In the left-side navigation pane, click Application Management. Find the target application and click Delete in the Actions column.

  4. In the Delete application dialog box, enter the application name, and then click OK.