PROVIDER - Distributed Job Scheduler
XXL-JOB
XXL-JOB is a lightweight distributed scheduler where an admin console configures cron jobs and routes them to embedded executors, with ten routing strategies, sharding broadcast and retries; GPL-3.0 with no licence fee.
3.9pts
Service Overview
XXL-JOB is a lightweight distributed job scheduler: an admin console configures tasks, cron expressions and routing strategies, while executors ship as an SDK embedded in business applications, registering with the admin and accepting triggers. It targets Java teams that want to replace scattered scheduled threads and system cron with centrally managed schedules.
The project is maintained by Xu Xueli, licensed under GPL-3.0, with roughly 30,000 stars and the current 3.5.x line released in October 2026. Admin and executors communicate through a built-in registry, and several admin instances coordinate via a database lock to avoid duplicate triggers.
Key Strengths
- The admin console manages tasks, so cron expressions, parameters and routing leave application code.
- Executors embed as an SDK in Spring apps, letting existing bean methods be scheduled with an annotation.
- Ten routing strategies cover round robin, failover, consistent hashing and sharding broadcast.
- Retries, timeout control and blocking policies are set per task, preventing pile-ups from redoing work.
- GPL-3.0 licensing means no fee and no task cap, backed by reasonably complete community docs.
Limitations
- GPL-3.0 is copyleft, so redistributing a closed-source product that embeds it needs legal review.
- There is no native DAG dependency, so task chains rely on timing gaps or manual wiring.
- Sharding broadcast distributes work but leaves result aggregation to your own code.
- The admin relies on the database for registry and locks, so an outage stops triggering.
- The UI is basic, lacking a resource centre, multi-tenancy and fine-grained audit for large organisations.
Product Ecosystem
XXL-JOB splits scheduling from execution: the admin decides when to fire and which executor receives the trigger, and the executor only runs and reports. Because executors live inside business applications, task code ships with the application release.
Task modes and configuration
Tasks come as beans or GLUE scripts. Bean mode registers annotated methods in the application and passes parameters plus shard information through a context; GLUE mode keeps shell or Python scripts in the console, hot-reloading them without an application release.
Routing strategies and sharding broadcast
Each task picks a routing strategy: round robin, random, consistent hashing, failover, busy transfer and others. Sharding broadcast splits one trigger across every machine in the executor group, with each machine handling its own shard index, which fits table scans and reconciliation.
Blocking policies, retries and timeouts
Blocking policies decide what happens while a previous run is still active: serial execution on the same machine, discard later triggers or terminate the running one. Retry counts and timeouts are set per task, and the admin interrupts and records runs that exceed the limit.
Registry, high availability and alerts
Executors register on startup, and multiple admins negotiate through a database lock so a task is not triggered twice. Alerting is email-based with per-task recipients, and channels needing instant delivery can point at the callback pattern described in webhook signature verification.
Joining business systems
Because executors run inside business applications, tasks reach existing services and data access layers directly. Cross-system triggers can call the other side's API, or that system can fire tasks through the admin OpenAPI.
Use Cases
- Good fit|Scheduled work in Java applications: move scattered scheduled threads into a central console.
- Good fit|Batch scans and reconciliation: sharding broadcast lets several machines process separate ranges.
- Good fit|Script-based operations: GLUE tasks run shell and Python without an application release.
- Good fit|Jobs needing failover: routing hands the trigger to a healthy node when one fails.
- Evaluate|Flows needing DAG dependencies: there is no native dependency graph; use another orchestrator.
- Evaluate|Redistributing closed-source products: GPL-3.0 copyleft needs a legal review.
- Evaluate|Second-level or faster triggers: scheduling precision is designed around minutes.
Open Source License & Deployment Cost
No commercial licence is required, so budget goes to hosts and people: two admin instances usually, a database that may be shared, and executors that ship with applications.
| Item | Billing | Size and volume | Notes |
|---|---|---|---|
| Software licence | free | unlimited tasks and executors | GPL-3.0, commercial use and modification allowed; redistributing a closed-source product needs review |
| Admin hosts | billed by your cloud or colocation | two instances in production, sized by trigger volume and logs | multiple admins rely on a database lock, and clocks must be aligned to avoid duplicate triggers |
| Database | reuse an existing instance or provision one | MySQL, sized by scheduling log retention | task config, executor registry and logs all live here |
| Executor resources | scales with applications | memory sized by shard volume and parallelism | every executor needs connectivity to the data source used by its shards |
| Operations effort | internal team time | deployment, upgrades, log purging, alert upkeep | scheduling logs grow quickly, so archive or purge on a schedule |
| Alert channel | usually free | a mail server or your own SMTP relay | instant channels can call an external webhook from the task |
Back up the database and check the release notes before upgrading; admin and executor versions must stay within the supported range.
FAQ
- How does it differ from Quartz? Quartz is an in-process scheduling library where jobs live and die with the application, and configuration spreads across applications. XXL-JOB makes scheduling a separate service with centrally managed tasks, observable trigger records once executors register, and better fit for many applications and teams.
- Does GPL-3.0 affect commercial use? Internal use is unaffected and modified source need not be published. Distributing a system containing XXL-JOB as a closed-source product raises licence obligations, so common practice keeps it internal without shipping binaries, or obtains legal advice on where the boundary sits.
- How are sharding results aggregated? Sharding broadcast only distributes work, with each executor handling its own index range, and results are not collected automatically. A common pattern writes shard output into one table or object store keyed by shard id, then a follow-up task or report reads them while staying idempotent.
- Will scheduling logs fill the database? They grow with trigger volume. Purge on a retention schedule or archive history to cold storage, and avoid logging large parameter payloads. The purge script itself can run as a scheduled task, which keeps maintenance off the manual list.
- Can it integrate with non-Java systems? Yes. GLUE tasks run shell and Python scripts, and executors register and report over HTTP. Non-Java services can be called from a task, or call the admin OpenAPI to trigger tasks, leaving scheduling and observability in the centre while services only execute.
Integration & Code Examples
Register a bean task in a Spring application
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@Component
public class OrderSyncJob {
@XxlJob("orderSyncHandler")
public void orderSync() throws Exception {
// shard parameters come from the admin, splitting work across machines
int shardIndex = XxlJobHelper.getShardIndex();
int shardTotal = XxlJobHelper.getShardTotal();
XxlJobHelper.log("shard {}/{} start", shardIndex, shardTotal);
// business logic: pull orders for this shard and write downstream
boolean ok = syncOrders(shardIndex, shardTotal);
if (!ok) {
XxlJobHelper.handleFail("sync failed on shard " + shardIndex);
return;
}
XxlJobHelper.handleSuccess("shard done");
}
private boolean syncOrders(int index, int total) {
return true;
}
}
Configure the executor and trigger a task
# application.properties: register with the admin and declare the executor name
xxl.job.admin.addresses=http://scheduler-a:8080/xxl-job-admin,http://scheduler-b:8080/xxl-job-admin
xxl.job.executor.appname=order-service
xxl.job.executor.port=9999
xxl.job.accessToken=change-me
# trigger once through the OpenAPI, passing parameters defined on the task
curl -X POST "http://scheduler-a:8080/xxl-job-admin/api/trigger" \
-H "XXL-JOB-ACCESS-TOKEN: ${XXL_TOKEN}" \
-d "jobId=12&executorParam=date%3D2026-11-30&addressList="
The executor name must match the one registered in the console, otherwise the task fails with no available node.
Community & Resources
- XXL-JOB documentation — architecture, integration steps and release features
- GitHub repository — GPL-3.0 source, issues and releases
- Releases — admin and executor sample packages
- Author's blog — technical articles and update notes
- Gitee mirror — mirror with faster access from mainland China
- Issue tracker — bug reports and usage questions
Articles
- 01 Video SEO for Google Search and YouTube 07-18
- 02 Triggered Email Design: Events, Eligibility, and Frequency 07-18
- 03 Online Form Builder Comparison 11-26
- 04 Cold email costs: volume, warm-up and re-domaining 07-18
- 05 Email Bounce Causes and Responses 07-18
- 06 E-Signature and Contract Cost Structure 07-18
- 07 Choosing Free Mailbox and Sending Quotas 11-26
- 08 Community Forum Ownership: Hosted Service or Own Server 11-26
- 09 Cookie Consent Platform Selection 11-26
- 10 Choosing Team Messaging for China-Based Teams 11-26