SchedulerX schedules periodic programs, runs scripts in Shell, Python, PHP, and Node.js, calls HTTP operations, and manages native Kubernetes Jobs, CronJobs, and Pods. This topic covers three deployment methods and how to create Jobs after deployment.
Why use SchedulerX for Kubernetes scheduling
Edit scripts without rebuilding images
Standard Kubernetes Jobs require you to package scripts into container images and configure commands in YAML. Every script change means a new image build and redeployment.
With SchedulerX, edit scripts directly in the console. SchedulerX runs them in Pods automatically, and changes take effect on the next scheduled run. No image builds or YAML updates are needed.
Supported languages: Shell, Python, PHP, and Node.js.
Drag-and-drop workflow orchestration
SchedulerX provides a visual editor for orchestrating Kubernetes Jobs with drag-and-drop operations. Running workflows are displayed as directed acyclic graphs (DAGs), making it straightforward to identify blocked Jobs and troubleshoot issues.
Argo Workflows, a widely adopted solution, requires workflow definitions in YAML:
Built-in monitoring and alerting
SchedulerX monitors every Pod and Job it schedules:
Alert channels: text messages, phone calls, emails, and webhook URLs for DingTalk, WeCom, and Lark bots.
Alert triggers: Job execution failures and timeouts.
Automatic log collection
SchedulerX collects Pod and Job logs automatically. When a Pod fails, check the logs directly in the SchedulerX console instead of running kubectl logs.

Real-time monitoring dashboard
The Overview page in the SchedulerX console displays all Jobs and their status in real time.
Mixed deployment of online and offline Jobs
Some periodic Jobs consume significant resources but run infrequently (for example, once per hour or once per day). Instead of running them in the same process as your business application, create a separate Pod for the Job. This isolates resource-intensive batch work from your online services. SchedulerX supports scheduling both Java and Kubernetes Job types in a single environment.
Prerequisites
Before you begin, make sure that you have:
A running Container Service for Kubernetes (ACK) cluster or a self-managed Kubernetes cluster
A Kubernetes application created in the MSE SchedulerX console

Choose a deployment method
| Method | Best for | How it works |
|---|---|---|
| Deployment YAML (recommended) | Non-Java applications | Deploys the SchedulerX agent as a standalone Pod |
| Helm chart | Non-Java applications with Helm-based workflows | Installs the agent through a Helm package |
| Java SDK | Java applications that also schedule Kubernetes Jobs | Embeds SchedulerX in your application process |
Agent image reference
All Deployment-based and Helm-based installations use the SchedulerX agent image. Select the image that matches your cluster's chip architecture and region.
| Architecture | China regions | Outside China |
|---|---|---|
| x86_64 | registry.cn-hangzhou.aliyuncs.com/schedulerx/agent:latest-amd64 | schedulerx-registry.ap-southeast-1.cr.aliyuncs.com/schedulerx/agent:latest-amd64 |
| ARM64 | registry.cn-hangzhou.aliyuncs.com/schedulerx/agent:latest-arm64 | schedulerx-registry.ap-southeast-1.cr.aliyuncs.com/schedulerx/agent:latest-arm64 |
Agent environment variables
The SchedulerX agent requires the following environment variables. Find these values on the Application Management and Namespace pages in the SchedulerX console.
| Variable | Description | Example |
|---|---|---|
SCHEDULERX_ENDPOINT | Regional endpoint for your application. See Endpoints. | addr-sh-internal.edas.aliyun.com |
SCHEDULERX_NAMESPACE | Namespace ID, found on the Namespace page. | f856c3f8-a15c-... |
SCHEDULERX_GROUPID | Application ID, found on the Application Management page. | k8s-test3 |
SCHEDULERX_APPKEY | Application key, found on the Application Management page. | -- |

Method 1 (recommended): Deploy using a Deployment
For non-Java applications, deploy schedulerx-agent.yaml as a Deployment. The SchedulerX agent runs as a standalone Pod that communicates with the Kubernetes API server.

Step 1: Configure a service account
The service account provides an identity for validation and authorization when SchedulerX schedules Kubernetes Jobs. By default, the service account of the namespace to which the Job belongs is used.
Run the service account YAML once per namespace. Choose the scope that fits your use case:
| Scope | When to use | RBAC resources |
|---|---|---|
| Single namespace | Schedule Pods and Jobs within one namespace only | Role + RoleBinding |
| Cross-namespace | Schedule Pods and Jobs across multiple namespaces | ClusterRole + ClusterRoleBinding |
Single-namespace scope
Apply the YAML:
kubectl apply -f schedulerx-serviceaccount.yaml -n <your-namespace>Cross-namespace scope
Replace <NAMESPACE1> and <NAMESPACE2> with the namespaces where the SchedulerX service account should operate.
Apply the YAML:
kubectl apply -f schedulerx-clusterrole.yamlStep 2: Install the SchedulerX agent
Create a file named schedulerx-agent.yaml with the following content. Replace the environment variable values with your application's access parameters (see Agent environment variables).
Apply the Deployment:
kubectl apply -f schedulerx-agent.yaml -n <your-namespace>Verify the deployment
Check that the agent Pod is running: Expected output:
kubectl get pods -l app=schedulerx-agent -n <your-namespace>NAME READY STATUS RESTARTS AGE schedulerx-agent-xxxxxxxxx-xxxxx 1/1 Running 0 1mConfirm the agent is connected by checking the Application Management page in the SchedulerX console. An available instance indicates a successful connection.
Method 2: Deploy using a Helm chart
If your team uses Helm for Kubernetes package management, install the SchedulerX agent as a Helm chart.
Additional prerequisite: Helm is installed on your machine.
Step 1: Download the Helm chart
wget https://schedulerx2.oss-cn-hangzhou.aliyuncs.com/helm/schedulerxchart-2.0.0.tgzStep 2: Install the Helm chart
Get your application's access parameters from the SchedulerX console:
Log on to the MSE SchedulerX console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Application Management.
On the Application Management page, click Access configuration in the Operation column. In the upper-left corner of the Access configuration panel, select k8s from the drop-down list.
Run the installation command. Replace the placeholder values with your access parameters:
NoteThe default image in the access configuration is the x86_64 Internet image. Select an image that matches your cluster's architecture and region from theagent image referencetable.
helm install schedulerxchart schedulerxchart-2.0.0.tgz \ --set SCHEDULERX_ENDPOINT=<your-endpoint> \ --set SCHEDULERX_NAMESPACE=<your-namespace-id> \ --set SCHEDULERX_GROUPID=<your-app-id> \ --set SCHEDULERX_APPKEY=<your-app-key> \ --set SCHEDULERX_AGENT_IMAGE=<agent-image>
Verify the deployment
Check that the agent Pod is running: Expected output:
kubectl get pods -l app=schedulerx-agent -n <your-namespace>NAME READY STATUS RESTARTS AGE schedulerx-agent-xxxxxxxxx-xxxxx 1/1 Running 0 1mConfirm the agent is connected by checking the Application Management page in the SchedulerX console. An available instance indicates a successful connection.
Method 3: Deploy using the SchedulerX Java SDK
For Java applications that need to schedule both Java programs and Kubernetes Jobs, embed SchedulerX in your application using the Java SDK. In this mode, SchedulerX shares the same process as your application.

Connect your application to SchedulerX
Integrate the SchedulerX SDK for Java with your Spring Boot application. See Connect a Spring Boot application to SchedulerX.
Add the
schedulerx-plugin-kubernetesdependency to enable Kubernetes Job scheduling:NoteReplace
schedulerx2.versionwith the latest version. See Release notes.<dependency> <groupId>com.aliyun.schedulerx</groupId> <artifactId>schedulerx2-spring-boot-starter</artifactId> <version>${schedulerx2.version}</version> </dependency> <dependency> <groupId>com.aliyun.schedulerx</groupId> <artifactId>schedulerx2-plugin-kubernetes</artifactId> <version>${schedulerx2-plugin-kubernetes.version}</version> </dependency>
Create and run Kubernetes Jobs
After deploying the SchedulerX agent, create Kubernetes Jobs from the SchedulerX console. For all Job types below, go to the Task Management page and click Create task. For full details, see Job management.
Run a Shell script
In the Create task panel, set Task type to K8s and resource to Shell-Script.
Use the default busybox image or specify a custom image.
Click Run once.
A Pod named schedulerx-shell-{JobId} starts in the cluster.

Check the execution history and Pod logs on the Task Management page.
Run a Python script
In the Create task panel, set Task type to K8s and resource to Python-Script.
Use the default python image or specify a custom image.
Click Run once.
A Pod named schedulerx-python-{JobId} starts in the cluster.

Check the execution history and Pod logs on the Task Management page.

Run a PHP script
In the Create task panel, set Task type to K8s and resource to Php-Script.
Use the default
php:7.4-cliimage or specify a custom image.
Click Run once.
A Pod named schedulerx-php-{JobId} starts in the cluster.

Check the execution history and Pod logs on the Task Management page.

Run a Node.js script
In the Create task panel, set Task type to K8s and resource to Nodejs-Script.
Use the default
node:16image or specify a custom image.
Click Run once.
A Pod named schedulerx-node-{JobId} starts in the cluster.

Check the execution history and Pod logs on the Task Management page.

Run a native Kubernetes Job (Job-YAML)
In the Create task panel, set Task type to K8s and resource to Job-YAML.
Enter the Job YAML definition.

Click Run once.
The Job and its Pod start in the cluster.

Check the execution history and Pod logs on the Task Management page.

Run a native Kubernetes CronJob (CronJob-YAML)
In the Create task panel, set Task type to K8s and resource to CronJob-YAML.
Enter the CronJob YAML definition.

Click Run once.
In the Operation column for the Job, choose more > Historical records to view the Pod status in the Task instance records panel.

Check the Pod execution history and logs on the Task Management page.

Run a native Kubernetes Pod (Pod-YAML)
In the Create task panel, set Task type to K8s and resource to Pod-YAML.
Enter the Pod YAML definition.

Click Run once.
The Pod starts in the cluster.

Check the execution history and Pod logs on the Task Management page.

When using Pod-YAML, keep the following in mind:
Avoid scheduling long-running Pods, such as web application Pods. Once started, these Pods never complete.
Disable Pod restart policies. Otherwise, the Pod restarts repeatedly after completion.
What's next
Job management: Create, configure, and manage scheduled Jobs.
Endpoints: View the full list of regional endpoints.