Learn how to manage SchedulerX tasks on the task management page.
Create a task
Before you create a task, make sure that you have created an application group. For more information, see Application management.
-
Log on to the MSE SchedulerX console.
-
Log on to the EDAS console.
-
In the navigation pane on the left, click Task Management, and select the region and Namespace for the task.
-
Click Add Task. In the Basic Configuration step, configure the task settings, and then click Next.
The following table describes the basic configuration parameters.
Parameter
Description
Task name
A custom name for the task.
Description
A short description to identify the task in search results.
Application ID
The application group to which the task belongs. Select a group from the drop-down list.
Task type
The language or runtime for the task. Supported types are Java, XXL-JOB, SpringSchedule, Golang, script task, Http, and DataWorks.
If you select script task, select a scripting language: shell, python, or go. You can then write the task script in the provided editor.
Class full path
NoteThis parameter appears only when Task Type is set to Java.
The fully qualified class name of the JobProcessor, such as
xxx.xxx.xxx.HelloProcessor.Execution mode
Specifies how the task runs. The following modes are supported:
-
stand-alone operation: Runs on a single, randomly selected worker.
-
broadcast run: Runs on all workers simultaneously and completes only after every worker finishes.
-
Visual MapReduce: A Map model with a visual list of subtasks. Supports up to 300 subtasks.
The Professional edition supports up to 1,000 subtasks and allows you to search for subtasks by business keyword.
-
MapReduce: A standard MapReduce model that supports parallel processing for a large number of subtasks. It only provides summary information for subtask runs. Recommended for tasks with up to 1 million subtasks.
-
shard run: Similar to the elastic-job model, you can configure sharding parameters to distribute shards evenly among multiple clients. This mode supports multiple languages.
NoteThe advanced settings change based on the selected execution mode.
Task parameters
An arbitrary string accessible from the task context at runtime.
The following table describes the advanced configuration parameters.
Parameter
Applicable execution modes
Description
Default
Task failure retry count
All modes
The number of times to automatically retry the task after it fails.
NoteIf a worker that is running a task restarts, the task's status changes to failed. You can configure this parameter to immediately rerun the task.
0
Task failure retry interval
All modes
The interval between retries. Unit: seconds.
30
Task concurrency
All modes
The maximum number of instances of the same task that can run concurrently. A value of 1 prevents overlapping runs.
1
Cleaning strategy
All modes
The cleanup policy for task execution history.
Keep last N entries
Number of records to retain
All modes
The number of task execution records to retain.
300 records
Subtask concurrency per machine
-
Visual MapReduce
-
MapReduce
-
shard run
For distributed models, this is the number of subtasks that a single worker can process concurrently. You can increase this value to speed up execution, or decrease it if downstream systems or databases cannot handle the load.
5
Subtask failure retry count
-
Visual MapReduce
-
MapReduce
-
shard run
For distributed models, this is the number of times to automatically retry a failed subtask.
0
Subtask failure retry interval
-
Visual MapReduce
-
MapReduce
-
shard run
For distributed models, this is the interval between subtask retries. Unit: seconds.
0
Subtask failover strategy
-
Visual MapReduce
-
MapReduce
-
shard run
If enabled, failed subtasks are redistributed to other workers. This process might cause a subtask to run more than once, so your code must be idempotent.
NoteClient v1.8.13 or later is required.
Master node participates in execution
-
Visual MapReduce
-
MapReduce
-
shard run
Specifies whether the master node also executes subtasks. You must have at least two workers online. If you have a very large number of subtasks, we recommend that you disable this parameter.
NoteClient v1.8.13 or later is required.
Subtask distribution method
-
Visual MapReduce
-
MapReduce
-
shard run
-
push model: Distributes subtasks evenly across workers.
-
pull model: Each worker actively pulls subtasks. This avoids the "weakest link" effect. During the pull process, all subtasks are cached on the master node, which can consume significant memory. This model is recommended for tasks with no more than 10,000 subtasks.
push model
Distribution policy
-
Visual MapReduce
-
MapReduce
The distribution policy for subtasks. By default, the system distributes subtasks across nodes in a round-robin manner.
-
polling scheme: Assigns an equal share of subtasks to each worker. Use this scheme when subtasks have similar processing times.
-
Load-based strategy: The master node detects worker loads and distributes subtasks accordingly. Use this scheme when processing time varies across subtasks or workers.
NoteClient v1.10.14 or later is required.
Distribution rate
-
Visual MapReduce
-
MapReduce
The rate at which subtasks are distributed. You can specify the number of subtasks to distribute per second or per minute.
Pull size per request (pull model only)
-
Visual MapReduce
-
MapReduce
-
shard run
The number of subtasks that a worker (slave node) pulls from the master node in a single request.
5
Subtask queue capacity (pull model only)
-
Visual MapReduce
-
MapReduce
-
shard run
The size of the subtask cache queue on each worker (slave node).
10
Global subtask concurrency (pull model only)
-
Visual MapReduce
-
MapReduce
-
shard run
In the distributed pull model, you can set a global limit on the number of concurrent subtasks for rate limiting.
1,000
-
-
In the Timing Configuration step, configure the schedule settings and advanced parameters, and then click Next.
The following table describes the schedule parameters.
Parameter
Description
Time type
-
none: No scheduling. Tasks are typically triggered by a workflow.
-
cron: A cron expression.
-
api: Triggered by an API call.
-
fixed_rate: A fixed interval.
-
second_delay: A fixed delay in seconds.
-
onetime: A one-time task.
-
unix cron: A Unix-style cron expression.
Cron expression (for cron time type only)
Enter a cron expression. You can write the expression directly or use a tool to generate and validate it.
Fixed frequency (for fixed_rate time type only)
Enter a fixed frequency in seconds. The value must be greater than 60. For example, a value of 200 means the task is scheduled every 200 seconds.
Fixed delay (for second_delay time type only)
Enter a fixed delay in seconds. Valid values range from 1 to 60. For example, 5 triggers the task after a 5-second delay.
Scheduled time (for onetime time type only)
Enter the scheduled run time of the task. Example:
2023-7-13 00:00:00.Unix cron expression (for unix cron time type only)
Enter a Unix-style cron expression.
The following table describes the advanced configuration parameters.
Parameter
Description
Time offset
The offset between the data timestamp and the schedule time. You can retrieve this value from the scheduling context.
Time zone
Select a time zone based on your needs. You can select a common country or region time zone, or a standard GMT offset.
-
-
In the Notification Configuration step, configure alert parameters and contacts, and then click Complete.
This step includes several alert settings: Timeout alarm, Timeout termination, Success notification, Failure alarm, and No available machine alarm. You can also specify notification recipients by selecting either Application group contact or Custom.
Notification Channels and Contacts currently supports Application Group Contacts and Custom.
-
Application group contact
All contacts in the application group receive notifications.
-
Custom
In custom mode, you can specify recipients by Contact group or Contact.
-
Contact group
All contacts in the selected contact group receive notifications. For more information about how to create a contact group, see Notification contacts.
-
Contact
1. To add notification contacts, click Add Contact, and then click Go to Create Contact. The system sends notifications to all added contacts.
2. In the dialog box that appears, click New Contact and enter the contact information.
Contact information includes Name (required), Mobile, Email, webhook, and Contact Group.
-
-
-
Return to the Task Management page to verify that the task was created with your specified settings.
NoteTasks are enabled by default after creation. You can also disable and then re-enable a task based on your business requirements. For more information, see Enable and disable scheduled tasks.
Edit task
-
On the Tasks page, click Edit in the Actions column for the target task.
-
In the Edit panel, configure the Basic, Scheduling, and Notification settings.
NoteYou cannot modify the Application ID or Task Type. The configuration rules for other parameters are the same as when creating a task.
Run a scheduled task
On the Tasks page, click Run once in the Actions column to run the task immediately.
In the confirmation dialog box, select an instance from the specified machine drop-down list, enter parameters in the instance parameter text area (instance parameters do not override task parameters), then click OK to run the task.
Enable or disable tasks
Enable or disable a single task
-
On the Tasks page, click More in the Actions column for the desired task, and then select Disable or Enable.
-
In the confirmation dialog box, click Confirm.
Batch enable or disable tasks
With the Professional Edition, you can enable or disable multiple tasks at once. On the Tasks page, select the checkboxes for the desired tasks, and then click Batch disable or Batch enable at the bottom of the task list.
Copy a scheduled task
On the Tasks page, in the Actions column for the target task, click More > Copy. This copies the task's configuration, which you can then edit to create a new scheduled task.
Backfill a task
If you need to re-execute a task for a past period due to business changes, such as adding a new field to a database or correcting errors in historical data, you can backfill the task.
Backfill supports both tasks and workflows but is limited to daily scheduling cycles.
If data from a previous task run is incorrect or missing, run a backfill to retrieve the correct data.
-
Log in to the MSE SchedulerX console.
-
On the Task Management page, in the Actions column for the target task, click More > Backfill Task.
-
In the Backfill Task panel, set the start and end date and data timestamp, and then click OK.
-
Start and end date: The date range to backfill.
-
Data timestamp: Specifies the time of day for each backfill instance generated within the date range.
Example backfill configuration:
-
Current time: 2019-01-01 10:00:00.
-
Start and end date: 2018-10-01 to 2018-10-07. By default, the range spans from 00:00:00 on 2018-10-01 to 23:59:59 on 2018-10-07.
-
Data timestamp: 11:11:11.
The backfill generates seven task instances.
ID
Scheduling time
Data timestamp
1
2019-01-01 10:00:00
2018-10-01 11:11:11
2
2019-01-01 10:00:00
2018-10-02 11:11:11
3
2019-01-01 10:00:00
2018-10-03 11:11:11
4
2019-01-01 10:00:00
2018-10-04 11:11:11
5
2019-01-01 10:00:00
2018-10-05 11:11:11
6
2019-01-01 10:00:00
2018-10-06 11:11:11
7
2019-01-01 10:00:00
2018-10-07 11:11:11
-
Execution history and operation records
-
View execution history: On the Task Management page, click More>History in the Actions column of the target task to view its execution history. On the Task Instance History page, you can filter records by criteria such as status, application ID, and date, and select the Include Workflows checkbox. The history table includes columns such as Task ID/Name, Task Type/Execution Method, Instance ID/Process Instance ID, Application ID, Start Time, End Time, and Operator. The Actions column provides links to Details, Logs, and More. A message at the top of the page indicates that the Standard Edition supports viewing only 30 records, while the Professional Edition supports 300 records.
-
View operation records: On the Task Management page, click More > Operation Records in the Actions column of the target task to view the management operation records for the scheduled task. The Operation Records page supports filtering by Type and Task ID. The results table includes the Task ID, Operation Time, Operation Type, Operator, Extensions, and Actions columns. You can click View to see the operation details.
Delete a task
-
To stop billing for SchedulerX, first delete or disable all tasks in the target application to prevent further charges.
-
If a task is part of a task orchestration, delete the associated workflow before you delete or disable the task.
For more information about SchedulerX billing, see Billing for SchedulerX instances.
-
On the Tasks page, click More > Delete in the Actions column for the target task.
-
In the confirmation dialog box, click Confirm.
Import or export tasks
-
On the Tasks page, select a Professional Edition application.
Select the application from the All Applications drop-down list at the top of the page.
-
Click Import task or Export tasks.