All Products
Search
Document Center

Microservices Engine:Specify a tag

Last Updated:Mar 11, 2026

SchedulerX randomly assigns machines to jobs. When some machines run different job implementation classes -- for canary releases or stress testing -- random assignment can route a job to a machine that lacks the required class.

Tags solve this. Register a tag on the SchedulerX agent, then select that tag when you configure the job in the console. The job runs only on machines with the matching tag, while all machines remain in the same application group.

Why use tags instead of separate application groups

The traditional workaround is to create a dedicated application group for canary release or stress testing machines. This approach has two drawbacks:

  • Wasted resources. Normal jobs cannot run on machines in the canary group, even when those machines are idle. Because canary traffic is typically low, dedicated machines sit underutilized.

  • Complex promotion workflow. After a canary release passes validation, you must create a duplicate job in the original group and delete the canary job, rather than promoting the existing one.

With tags, all machines stay in the same application group. Normal jobs continue to run on all machines, while tagged jobs run only on the machines you designate. After a canary release passes, remove the tag and the change takes effect immediately -- no need to create or delete jobs.

Prerequisites

Before you begin, make sure that you have:

Step 1: Register a tag on the SchedulerX agent

Add the spring.schedulerx2.label property to your Spring Boot configuration file. The following example shows application.properties with the tag set to gray:

# SchedulerX connection settings (already configured)
spring.schedulerx2.endpoint=<your-endpoint>
spring.schedulerx2.namespace=<your-namespace>
spring.schedulerx2.groupId=<your-group-id>
spring.schedulerx2.appKey=<your-app-key>

# Tag this machine for canary release jobs
spring.schedulerx2.label=gray

Replace gray with any string that describes the machine's role, such as canary, stress-test, or staging.

After the application starts, the agent registers this tag with SchedulerX automatically.

Step 2: Verify tag registration

  1. Log on to the MSE SchedulerX console.

  2. Log on to the SchedulerX console.

  3. In the left-side navigation pane, click Task Scheduling (SchedulerX).

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

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

  6. On the Application Management page, find your application and click View Instances in the Operation column.

  7. In the Connect to an instance panel, check the tag column. The tag value you configured (for example, gray) appears next to the corresponding instance.

Note: If the tag column is empty, confirm that the application restarted after you added the spring.schedulerx2.label property.

Step 3: Route a job to tagged machines

  1. Log on to the MSE SchedulerX console.

  2. In the left-side navigation pane, click Jobs.

  3. On the Task Management page, find the target job and click more in the Operation column.

  4. Click Specify machine.

  5. On the Specify machine page, set Named Types to tag.

  6. Select the machines you want the job to run on, and then click OK.

The job now runs only on the selected tagged machines.

Remove a tag after canary release

After the canary release passes validation and the new job implementation class is available on all machines:

  1. Clear the machine specification in the console: navigate to the job's Specify machine page and remove the tag assignment. This change takes effect dynamically.

  2. Optionally, remove the spring.schedulerx2.label property from the application configuration and restart the application.

The same job definition works across all machines once the tag restriction is removed.