All Products
Search
Document Center

SchedulerX:Application management

Last Updated:Jan 02, 2024

This topic describes how to use the Application Management module to perform specific operations in the SchedulerX console. For example, you can use the module to create an application (job group), check whether instances are connected to an application, and grant Resource Access Management (RAM) users the permissions to access an application.

Create an application

Before you create a job in the SchedulerX console, you must create an application.

Step 1: Configure the parameters in the Basic configuration step

  1. Log on to Distributed Task scheduling platform.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Application Management.

  4. On the Application Management page, select a namespace. Then, click Create application.

  5. In the Basic configuration step of the Create application wizard, configure the Application Name, Application ID, and app type parameters, and the parameters in the Advanced Configuration section based on your business requirements, and click Next Step.

    Category

    Parameter

    Description

    Default value

    Basic information

    Application Name

    Specify a name for the application.

    N/A

    Application ID

    Specify an ID for the application. The ID of an application is also the ID of a job group after the application is connected to SchedulerX. Make sure that the application ID is unique in a namespace. Otherwise, the application fails to be created. You can use the value of the Application Name parameter as the application ID.

    N/A

    Description

    Specify a description for the application.

    N/A

    app type

    • general app: Select this option if you do not want to deploy the application in a Kubernetes cluster or do not require Kubernetes jobs.

    • k8s App: Select this option if you want to deploy the application in a Kubernetes cluster and require Kubernetes jobs.

    • ECI App: Select this option if you want to deploy a serverless application and do not require SchedulerX SDKs or SchedulerX Agent. You can configure Elastic Container Instance-related parameters to dynamically run jobs on elastic container instances. For more information about Elastic Container Instance, see What is Elastic Container Instance?

      • regionId: the region ID of the elastic container instance on which you want to deploy the application. Example: cn-hangzhou.

      • AccessKeyId: You must apply for a RAM user and grant the RAM user permissions to create and query elastic container instances. This field is saved in encrypted mode. Example: LTAI5t8W3FWP******q2K2.

      • AccessKeySecret: You must apply for a RAM user and grant the RAM user permissions to create and query elastic container instances. This field is saved in encrypted mode. Example: dWr5SKDPlpXz*******A9n9.

      • vSwitchId: the ID of the vSwitch in the virtual private cloud (VPC) of the specified region. Example: vsw-hp3lqeio*******4ef0

      • securityGroupId: the network settings of the elastic container instance on which you want to deploy the application. You must enter an ID of the security group in the specified region. Example: sg-hp3fe5wx****t2la.

    general app

    Release

    Select a version based on your business requirements.

    Professional Edition

    Remote Log Server

    If you enable this feature, you must configure Log4j or Logback. Then, you can view the scheduling logs of every job (including distributed jobs) in the SchedulerX console for troubleshooting.

    Note

    If you create a general application of the Basic Edition, this parameter is unavailable.

    Disabled

    Machine Instance busy configuration

    load5

    Specify a value that is no greater than the number of vCPUs available on the worker.

    0

    Memory usage

    If the average memory usage within the previous five minutes exceeds the threshold that is specified by this parameter, the worker is considered busy.

    90%

    Disk Usage

    If the disk usage exceeds the threshold that is specified by this parameter, the worker is considered busy.

    95%

    Whether to trigger a busy machine

    Specify whether to continue to trigger jobs when the worker is busy.

    Enabled

    Advanced Configuration

    Maximum number of tasks

    Specify the maximum number of jobs that are supported by an instance group.

    1000

    Automatic expansion

    Specify whether to enable automatic expansion. If you enable this feature, you must configure the Number of global tasks parameter.

    Disabled

    Flow Control

    Specify whether to enable traffic throttling. If you enable this feature, you must configure the Number of concurrent task instances parameter.

    Disabled

    Number of concurrent task instances

    Specify the maximum number of job instances that can run at the same time for the application. Job instances that exceed the upper limit wait in a queue for execution.

    0

    Calendar

    You can select Financial day or Workday from the drop-down list.

    0

Step 2: Configure the parameters in the Notification configuration step

  1. In the Notification configuration step of the Create application wizard, configure the Notification channel and Contact parameters.

    • Valid values of the Notification channel parameter: SMS, Mail, webhook, and Telephone.

      For more information about how to configure a webhook, see Configure a webhook.

    • Valid values of the Contact parameter: Contact group and user-defined.

      • Contact group

        Add a contact group. All contacts in the contact group can receive notifications. For more information about how to create a contact group, see Create a notification contact and a notification contact group.

      • user-defined

        Add contacts in sequence. If you want to add multiple contacts, repeat the following operations: Click Add contact and enter the contact information.

  2. Click Complete.

    After the application is created, the application list is automatically refreshed.1

    Important
    • Application ID: This parameter must be specified for agent initialization. The ID of an application is also the unique identifier of a job group.

    • Application key: This parameter must be specified for SDK requests. The key of an application is used to verify the requests. Do not share your application key with other users.

Configure a webhook

For more information about how to obtain a webhook, see DingTalk development document, WeCom development documentation, and Lark development documentation.

  • WeCom, Lark, and DingTalk webhooks are supported. You can configure multiple webhook bots at the same time. Separate multiple bot URLs with commas (,).

  • If you configure a webhook for a DingTalk bot, you must specify the SchedulerX keyword. The keyword is case-sensitive. Otherwise, the alerts cannot be received.

  • If you use a custom webhook, make sure that the webhook can accurately parse and process requests. The following code provides an example on how to use a curl command to specify a request that is used to send a message to a custom webhook:

      curl 'https://oapi.xxxxxxx \
         -H 'Content-Type: application/json' \
         -d '
         {
          	"msgtype": "text",
          	"text": {
              	"content": "Details of the alert triggered in SchedulerX"
           },
           "at": {
              "isAtAll": false
          }
         }'

View instances

After you connect an application to SchedulerX, you can view the instances that run for the application to check whether the job for the application is connected to SchedulerX. To view instances, perform the following operations:

  1. On the Applications page, check the number in the Total number of instances column.

    Note

    If the value in the Total number of instances column is 0, you failed to connect the job for the application to SchedulerX.

  2. In the Operation column of the application, click View instances.

  3. In the Connect to an instance panel, view the instances that run for the application and the status of the instances.

    • The IP address of an instance is followed by a number that is enclosed in a pair of parentheses ( ). The number indicates the number of SchedulerX agents that run on the instance. In most cases, only one agent runs on an instance. You can connect an instance to multiple SchedulerX agents.

    • Instances are in the healthy or busy state. By default, SchedulerX does not schedule jobs to busy instances. If all instances are busy, SchedulerX does not schedule jobs. If you want SchedulerX to forcefully schedule jobs to busy instances, turn off Filter out busy machine in the alerting settings.

Grant RAM users the permissions to access an application

You can grant RAM users the permissions to access an application by using an Alibaba Cloud account or a RAM user.

2

If the system prompts that you do not have the required permissions after you click Authorization, you must use your Alibaba Cloud account to attach a custom policy to the RAM user. The following code shows the content of the custom policy:

{
    "Version": "1",
    "Statement": [
        {
            "Action": "ram:ListUsers",
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Delete an application

If you no longer want to create jobs for an application, you can delete the application. After you delete an application, the jobs that belong to the application cannot be triggered.

  1. On the Application Management page, find the application that you want to delete and click Delete in the Operation column.

  2. In the Delete application dialog box, confirm the application information, enter the application name, and then click OK.

Note
  • After you delete an application, the jobs that are associated with the application cannot be triggered, and the application is removed from the Application Management page.

  • If you want to restore an application that is accidentally deleted, join the DingTalk group (23103656) for technical support.