All Products
Search
Document Center

SchedulerX:Connect to SchedulerX using an agent

Last Updated:Mar 11, 2026

The SchedulerX agent connects non-Java applications to the SchedulerX console without an SDK. The agent is provided as a tar package or a Docker image. Once connected, you can use the SchedulerX console to create scheduled tasks, rerun tasks, view execution history, and check operational logs.

The agent supports three deployment methods. Choose the one that matches your environment:

MethodBest for
Manual deploymentBare-metal servers or VMs without container runtimes
Docker deploymentQuick setup, isolated environments, or CI/CD pipelines
Kubernetes deploymentExisting Kubernetes clusters with built-in health checks and scaling

When to use the agent

  • Run a Shell script on a schedule to clean up logs across multiple machines or restart a service.

  • Run a Python script to periodically purge stale data from a database.

  • Call an HTTP API on a schedule to scan orders.

Note

The agent also supports scheduling and execution of DataWorks tasks. For details, see DataWorks tasks.

Prerequisites

Before you begin, make sure that you have:

  • JRE 1.8 or later installed on the target machine

  • A SchedulerX application (namespace, application ID, and application key). See Create a resource

  • (Optional) A dedicated namespace. See Create a namespace

Manually deploy the agent

Step 1: Download and extract the agent

If the machine has a public IP address, download the agent directly:

wget https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-<version>.tar

Replace <version> with the version number from the table below (for example, 1.13.2). Then extract the archive:

tar -xf schedulerxAgent-<version>.tar
Important

If wget times out, enable a public IP address on the machine, or transfer the file manually. See Upload or download files (Linux).

Agent versions

VersionDownload URLChanges
1.13.2https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.13.2.tar.gzCPU metric collection under cgroup v2; custom thread pool size (share.pool.size)
1.12.5https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.12.5.tarTask system variables via placeholders; custom thread pool size for HTTP tasks; script tasks return last stdout line as execution result
1.11.5https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.11.5.tarFixed Netty and Logback security vulnerabilities; fixed "too old resource version" for Kubernetes tasks
1.10.13https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.10.13.tarMultiple agents on a single machine; HTTP responses larger than 1,000 bytes; optimized log storage
1.10.5https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.10.5.tarGraceful shutdown; Simple Log Service isolation by application group
1.9.8https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.9.8.tarHTTP tasks in agent mode; return last log line on script failure; Kubernetes tasks
1.7.10https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.7.10.tar.gzFixed slow second-level tasks; fixed Simple Log Service OOM error
1.4.2https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/agent/schedulerxAgent-1.4.2.tar.gzSimple Log Service support

Step 2: Configure the agent

Open schedulerxAgent/conf/agent.properties and set the following parameters:

# Required. Endpoint address for your region.
# Full list: https://www.alibabacloud.com/help/en/schedulerx/schedulerx-serverless/getting-started/endpoints
endpoint=<your-endpoint>

# Required. Namespace ID from the Namespace page in the SchedulerX console.
namespace=<your-namespace-id>

# Required. Application ID from the Application Management page in the SchedulerX console.
groupId=<your-application-id>

# Required. Application key from the Application Management page in the SchedulerX console.
appKey=<your-application-key>
PlaceholderWhere to find it
<your-endpoint>Endpoint list (varies by region)
<your-namespace-id>Namespace page in the SchedulerX console
<your-application-id>Application Management page in the SchedulerX console
<your-application-key>Application Management page in the SchedulerX console

Step 3: Start the agent

Run the startup script from the schedulerxAgent/bin/ directory:

cd schedulerxAgent/bin/
./start.sh

To set a specific heap size, use one of the memory-configured scripts instead:

ScriptHeap size
start-200m.sh200 MB
start-500m.sh500 MB
start-1g.sh1 GB

Step 4: Verify the deployment

Check the agent log for the startup confirmation message:

tail -f ~/logs/schedulerx/worker.log

The log path is ${user.home}/logs/schedulerx/worker.log. To find the user.home value, run ps aux | grep java. For example, if the admin user started the agent, the log path is /home/admin/logs/schedulerx/worker.log. If the root user started the agent, the log path is /root/logs/schedulerx/worker.log.

When the log contains Schedulerx Worker started, the agent is running and connected to SchedulerX.

Successful agent deployment
Note

The agent supports JDK 1.8 through 14. For JDK 15 or later, remove the -XX:+UseConcMarkSweepGC option from schedulerxAgent/bin/start.sh before starting the agent.

Stop the agent

To stop a running agent:

cd schedulerxAgent/bin/
./stop.sh

Deploy the agent as a Docker container

Step 1: Select an image

Choose the image that matches your network environment and CPU architecture:

Networkx86_64arm64
China (Hangzhou), public networkschedulerx-registry.cn-hangzhou.cr.aliyuncs.com/schedulerx2/agent:latest-amd64schedulerx-registry.cn-hangzhou.cr.aliyuncs.com/schedulerx2/agent:latest-arm64
Singapore, public networkschedulerx-registry.ap-southeast-1.cr.aliyuncs.com/schedulerx2/agent:latest-amd64schedulerx-registry.ap-southeast-1.cr.aliyuncs.com/schedulerx2/agent:latest-arm64

Step 2: Run the container

docker run -d \
  --env SCHEDULERX_ENDPOINT="<your-endpoint>" \
  --env SCHEDULERX_NAMESPACE="<your-namespace-id>" \
  --env SCHEDULERX_GROUPID="<your-application-id>" \
  --env SCHEDULERX_APPKEY="<your-application-key>" \
  <image-id>
PlaceholderDescriptionWhere to find it
<your-endpoint>Region-specific endpoint addressEndpoint list
<your-namespace-id>Namespace IDNamespace page in the SchedulerX console
<your-application-id>Application IDApplication Management page in the SchedulerX console
<your-application-key>Application keyApplication Management page in the SchedulerX console
<image-id>Docker image from the table aboveStep 1

Step 3: Verify the deployment

Check the container logs for the startup confirmation:

docker logs <container-id>

When the log contains Schedulerx Worker started, the agent is running.

Deploy the agent on Kubernetes

For Kubernetes clusters, deploy the agent as a Deployment using the YAML manifest below.

Step 1: Create the manifest

Save the following YAML as schedulerx-agent.yaml. Replace the environment variable values with your actual configuration:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: schedulerx-agent
  labels:
    app: schedulerx-agent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: schedulerx-agent
  template:
    metadata:
      labels:
        app: schedulerx-agent
    spec:
      containers:
      - name: schedulerx-agent
        image: schedulerx-registry.cn-hangzhou.cr.aliyuncs.com/schedulerx2/agent:latest-amd64
        imagePullPolicy: Always
        resources:
          requests:
            cpu: 500m
        env:
          # Required. Endpoint address for your region.
          # See https://www.alibabacloud.com/help/en/schedulerx/schedulerx-serverless/getting-started/endpoints
          - name: "SCHEDULERX_ENDPOINT"
            value: "<your-endpoint>"
          # Required. Namespace ID from the Namespace page in the SchedulerX console.
          - name: "SCHEDULERX_NAMESPACE"
            value: "<your-namespace-id>"
          # Required. Application ID from the Application Management page.
          - name: "SCHEDULERX_GROUPID"
            value: "<your-application-id>"
          # Required. Application key from the Application Management page.
          - name: "SCHEDULERX_APPKEY"
            value: "<your-application-key>"
          # Required for Kubernetes deployments.
          - name: "SCHEDULERX_STARTER_MODE"
            value: "pod"
        livenessProbe:
          exec:
            command: ["/bin/bash", "/root/health.sh"]
          timeoutSeconds: 30
          initialDelaySeconds: 30
PlaceholderDescriptionWhere to find it
<your-endpoint>Region-specific endpoint address. Example: addr-sh-internal.edas.aliyun.comEndpoint list
<your-namespace-id>Namespace IDNamespace page in the SchedulerX console. Namespace ID location
<your-application-id>Application IDApplication Management page in the SchedulerX console. Application ID location
<your-application-key>Application keyApplication Management page in the SchedulerX console. Application key location

Step 2: Apply the manifest

kubectl apply -f schedulerx-agent.yaml

Step 3: Verify the deployment

Check the pod logs for the startup confirmation:

kubectl logs -l app=schedulerx-agent

When the log contains Schedulerx Worker started, the agent is running. The liveness probe at /root/health.sh automatically monitors the agent and restarts it if it becomes unresponsive.