Connect HTTP applications to XXL-JOB
When your applications span multiple languages, frameworks, or deployment environments, installing a dedicated executor on each service adds operational overhead. XXL-JOB on Microservices Engine (MSE) solves this by triggering tasks through standard HTTP requests -- any service with an HTTP endpoint can participate in unified task scheduling without an executor or SDK.
Scenarios
| Scenario | Example |
|---|---|
| External system integration | Trigger a third-party API on a schedule |
| Serverless function triggering | Call a Function Compute endpoint at fixed intervals |
| Traditional application scheduling | Schedule tasks on Elastic Compute Service (ECS) instances or physical servers |
| Cross-VPC task triggering | Reach services outside the XXL-JOB instance's Virtual Private Cloud (VPC) through a domain name |
| Multi-language environments | Schedule tasks for services built with any language or framework |
Benefits
Non-intrusive connection: Connect to task scheduling through the HTTP protocol without deploying an agent in your business system.
Cross-platform compatibility: Supports any service that provides an HTTP interface, regardless of the programming language or framework.
Flexible deployment: Supports Kubernetes and non-Kubernetes environments, including traditional ECS instances and physical servers.
Simple configuration: Connect the executor by entering the HTTP service endpoint.
How it works
Kubernetes environment
Bind a Kubernetes Service to an XXL-JOB application. All pods behind that Service become execution nodes. The scheduling center discovers each pod's availability and health through Kubernetes service discovery in real time.
Non-Kubernetes environment
Bind one or more domain names to an XXL-JOB application. All HTTP tasks under that application share these domain names. When a task triggers, the scheduling center selects a target domain name based on the application context and routing policy, then sends the HTTP request.
Prerequisites
Before you begin, make sure that you have:
Step 1: Create an HTTP application
Log on to the XXL-JOB console and select a region in the top menu bar.
Click the target instance to open its details page.
In the left-side navigation pane, choose Application Management and click Create Application.
In the Create Application dialog box, select HTTP Application and configure the following fields:
Field Required Description AppName Yes Unique identifier for executor registration. 1--64 bytes. Supports letters, digits, underscores (_), and hyphens (-). Must start with a letter or digit. Name Yes Descriptive name for the application. 1--64 characters. AccessToken Yes Authentication token for executor registration. 6--32 characters. Supports letters and digits. The system auto-generates a value, which you can modify. Click OK.
The application appears in the application list with 0 executors. Proceed to Step 2 to connect an executor before running tasks.
Step 2: Connect an executor
Choose the connection method based on your deployment environment:
Kubernetes environment: Connect to a Kubernetes Service
Non-Kubernetes environment: Connect with a domain name
Connect to a Kubernetes Service
Before you begin
Make sure that:
The application runs in a Container Service for Kubernetes (ACK), Container Compute Service (ACS), or ACK Serverless cluster
The cluster and the XXL-JOB instance are in the same VPC
Bind the Service to the application
Return to the XXL-JOB console and go to the Application Management page.
Find the HTTP application and click Connect to open the Connect Executor dialog box.
Set Connection Type to Connect to K8s Service.
Select the connection details:
Field Description Cluster The ACK cluster where the application is deployed. Namespace The namespace where the application runs, such as default.Service The Service created earlier, such as test-http-app-service.Click OK.
After the connection succeeds, the application list displays the pods behind the Service, and the executor count updates from 0 to the actual number of pods.
Connect with a domain name
Verify network connectivity between the XXL-JOB instance and the target domain name before proceeding. Tasks fail with a "no worker available" error if the domain is unreachable.
On the Application Management page, find the HTTP application and click Connect to open the Connect Executor dialog box.
Set Connection Type to Enter Domain Name.
Configure the domain name settings:
Field Required Description Executor Address Yes An accessible HTTP service URL, such as https://httpbin.org.Tags No Labels for routing policy, such as test-label.Click OK.
After the connection succeeds, the application list displays the connected domain name.
Step 3: Create an HTTP task
In the left-side navigation pane, choose Task Management and click Create Task.
Configure the basic task settings:
Field Required Description Task Name Yes A name for the task, such as test-http-task.Associated Application Yes The HTTP application created in Step 1. Task Type Yes Select HTTP. Configure the HTTP request:
Field Required Description API Path Yes The request path. Must start with /, such as/or/v1/hello.Request Method Yes GET,POST,PUT,DELETE, or another HTTP method.Timeout Yes Request timeout in seconds, such as 30.(Optional) Add request details:
Field Description Header HTTP request headers, such as Content-Type: application/json.Query URL query parameters, such as param1=value1¶m2=value2.Body Request body for POST or PUT requests. Define success criteria: (Optional) Configure Success result parsing to extract values from the response using JSONPath or regular expressions.
Method Description Example HTTP status code Match a specific status code. 200Response body JSON Evaluate a JSONPath expression against the response body. $.codeequals200Response body Check whether the response body contains a specific string. "success"Configure failure retry:
Field Description Example Task failure retries Number of retry attempts on failure. 3Task failure retry interval Wait time between retries, in seconds. 30Configure the schedule:
Field Description Time Type cronorFixed Frequency.Cron Expression A cron expression defining the schedule. See the reference table below. Time Zone The time zone for schedule evaluation. Calendar Daily scheduling or a specific calendar. Start Time Effective immediately or at a specified time. Common cron expressions
Expression Schedule 0 0 12 * * ?Every day at 12:00 PM 0 0/30 * * * ?Every 30 minutes 0 0 9 * * ?Every day at 9:00 AM 0 0 0 * * ?Every day at midnight 0 0 9 ? * MON-FRIEvery weekday at 9:00 AM (Optional) Configure notifications:
Field Description Success notification Notification method for successful executions. Failure alarm Alarm configuration for failed executions. Notification Method Text message, webhook, email, phone call, or another method. Notification Recipient Contacts to receive notifications. Click Finish.
The task appears in the task list with a status of Enabled.
Step 4: Test the task
On the Task Management page, find the task and click Run Once.
In the confirmation dialog box, click OK to trigger execution.
In the left-side navigation pane, choose Task Instances to view execution records. Each record shows the execution ID, status, duration, and execution node. A status of Succeeded confirms the task completed correctly.
Click an execution ID or click Log to inspect the full HTTP exchange: request method, URL, headers, body, response status code, response headers, and response body.
(Optional) In the left-side navigation pane, choose Event Center to view the complete execution flow: Scheduled, Running, and Succeeded or Failed.
FAQ
"No worker available" error when running a task
The scheduling center cannot find an active executor for the application. The cause depends on your connection type:
Kubernetes connection: The ACK cluster has zero running nodes, or the pods behind the connected Service are not in the Running state. Verify that the Deployment has healthy pods and that the Service selector matches the Deployment labels.
Domain name connection: The configured domain name is unreachable from the XXL-JOB instance. Test connectivity from within the instance's VPC.
HTTP task type is missing from the task type list
The HTTP option appears only when the Associated Application is an HTTP application. Select the correct application and refresh the page.
Executor count stays at 0 after connecting to a Service
The Deployment behind the Service likely has no healthy pods.
Confirm the Deployment replica count is greater than 0.
Check that all pods are in the Running state and passing readiness probes.
The executor count updates automatically once pods become healthy.