Apache ShardingSphere ElasticJob: distributed scheduling through ZooKeeper
Distributed scheduled job. ElasticJob became an Apache ShardingSphere Sub-project on May 28 2020.
At a glance
- What is it?
- ElasticJob is a Java scheduling framework that shards one job definition across many executors and coordinates them through ZooKeeper. It suits teams already running ZooKeeper, and it is a poor fit for anyone without one.
- Who is it for?
- Adopt ElasticJob if you have Java 8 or above, Maven 3.5.0 or above, and a ZooKeeper 3.6.0 or above ensemble you already operate, and you want one job definition to run across many executors with failover and misfire handling. Do not adopt it if you have no ZooKeeper, if your jobs fit inside one process, or if you need DAG-based job dependency, which the README still marks TODO.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 9 days ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem ElasticJob solves, and who actually has it
A scheduled job that runs on one server is easy until that server is busy, slow, or dead. The usual answer is to run the same job on several machines, which immediately creates two new problems: every instance would execute the same work unless something divides it, and one instance dying mid-run leaves that slice of work unfinished unless something notices. ElasticJob exists to absorb both problems. The README describes it as a lightweight, decentralized solution that provides distributed task sharding services, and the stated goal is that developers stop worrying about non functional requirements such as job scale out. The intended audience is a Java team with a recurring batch or data-processing task whose volume has outgrown a single process, and with operators who would rather add servers than manually rebalance work. The README also frames the operator side directly: the claim is that operators no longer have to worry about high availability and management, and that capacity grows by simply adding servers. That is the pitch. The trade is that you take on a coordination dependency, which the Environment Required section makes explicit.
How sharding, failover and misfire work through the registry center
The architecture visible in the repository is a kernel plus pluggable pieces. The top level separates api/, kernel/, lifecycle/, registry-center/, ecosystem/, spring/, restful/, bootstrap/, distribution/ and examples/. The registry-center module is where coordination state lives, and the Environment Required section names ZooKeeper 3.6.0 or above as the backing service. Jobs are not scheduled by a central master process. Each executor registers itself and reads the shared sharding state, so the division of work is derived rather than assigned by a single coordinator, which is what the README means by decentralized.
The features list names three governance behaviours that follow from that design. Job sharding divides the job into slices across available executors. Failover reassigns work when an executor drops. Misfired handles the case where a scheduled trigger was missed and the job needs to catch up. The README also lists self diagnose and recover when distribute environment unstable, which is the same idea applied to the coordination layer itself. Resource Assign is described as aggregating the same job onto the same job executor and appending resources to newly assigned jobs dynamically, so adding an executor changes the shard layout without a restart of the others. One item on that list is not implemented: Job Dependency is marked TODO, with DAG based job dependency and DAG based job item dependency named as the intended scope. If your pipeline needs job B to run only after job A finishes, this project does not currently provide it.
Building ElasticJob and running a first job
ElasticJob is a Java library distributed through Maven Central, not a standalone server. The README states Java 8 or above, Maven 3.5.0 or above, and ZooKeeper 3.6.0 or above. The repository ships a Maven wrapper (mvnw and mvnw.cmd) at the top level, and examples/ contains separate example projects for embed ZK, plain Java, jobs, Spring and Spring Boot, plus an examples/pom.xml that builds them together. That examples tree is the practical starting point, because the README itself gives no install command and no configuration sample.
The README does not document a build command, so the only executable entry point it names is the Maven wrapper script that sits at the repository root:
./mvnwRunning it without arguments prints the wrapper's own usage output rather than building anything, which is the useful first check that the wrapper works on your machine.
For a first job, the examples/elasticjob-example-java and examples/elasticjob-example-springboot directories show the intended shape: a job class, a configuration object, and a scheduler that starts it. The README describes the extension surface rather than the API calls, saying the project uses a unified job API for each project and that developers only need code one time and can deploy at will. It also lists supported job types including dataflow, script, HTTP, file and big data, and notes that the SDK can work with Spring IOC.
The operational surface is separate. The README points to a companion repository, shardingsphere-elasticjob-ui, for the Admin Console, which provides job administration, job event trace query and registry center management. That console is a different codebase from the one reviewed here, and the README does not describe how it is installed or configured.
Where ElasticJob is the wrong choice
The ZooKeeper requirement is the sharpest constraint, and it is not incidental. Coordination state, sharding layout and failover decisions all live in ZooKeeper, so a cluster without one cannot run ElasticJob at all, and a cluster with a fragile one inherits that fragility. Teams running only a database and a message queue would be adding a stateful distributed system purely to schedule jobs. That is a real operational cost, and the README does not offer an alternative registry in the Environment Required section.
The second limitation is the missing dependency feature. Job Dependency is listed as TODO, so any workflow where one job must follow another has to be expressed outside ElasticJob, in whatever orchestrator or script already sequences your work. Using it as a general workflow engine is a mismatch.
The third is documentation depth in the README itself. It describes capabilities at a feature-list level and defers to the official website at shardingsphere.apache.org/elasticjob for detail. The README does not document rollback, does not document upgrade steps between releases, and does not include a single configuration example. Planning around a specific version therefore means reading RELEASE-NOTES.md and the docs/ directory rather than the front page.
Finally, the release cadence is uneven. The repository lists 3.0.5, 3.0.4 and 3.0.3; 3.0.4 followed 3.0.3 by roughly seven months, and 3.0.5 followed 3.0.4 by more than two years. The last push was on 2026-02-07. Anyone who needs predictable patch releases on a fixed schedule should weigh that history, since the README makes no commitment about release timing.
How ElasticJob differs from PowerJob
PowerJob appears in the related searches alongside ElasticJob, and the two take opposite approaches to the same problem. ElasticJob is a library: it is declared as a dependency inside your Java application, and your application process is the executor. There is no separate scheduler service to deploy, which is why the README calls it lightweight and decentralized. The coordination burden moves to ZooKeeper, which must already exist.
PowerJob is a platform with its own server component. Scheduling decisions and job metadata sit in that server rather than in a client library, and workers register with it. The consequence is that you deploy and operate one more service, but you do not need ZooKeeper, and job definitions can be managed centrally rather than compiled into each application.
That difference decides most adoption questions. If your jobs are Java code that belongs next to the business logic it processes, and you already run ZooKeeper, ElasticJob keeps the deployment surface small. If your jobs are heterogeneous, defined by operators rather than developers, or you want a console as the primary interface, a server-based scheduler matches that model better. The related searches also mix ElasticJob with ShardingSphere-JDBC, which is a different product in the same Apache project family: ShardingSphere-JDBC is a database sharding and proxy layer, not a scheduler, and the two share a project name rather than a function.
Licence and the cost of staying current
ElasticJob is released under the Apache License 2.0, and the repository carries both LICENSE and NOTICE files at the top level, which is the standard Apache Software Foundation layout. There is no separate commercial edition described in the README, and no licence key or registration step appears there. For most users the practical implication is permissive use with the usual obligations around attribution and notices; anything beyond that is a question for your own legal review, not something this article can settle.
The upgrade cost is the more tangible expense. Because ElasticJob is a library, a version bump is a dependency change in your build plus a redeploy of every executor, and the sharding state in ZooKeeper has to remain compatible across the rollout. The README does not describe a mixed-version rollout procedure, and it does not describe rollback. With 3.0.5 arriving more than two years after 3.0.4, there is also a long window in which a bug fix may simply not exist for your version, so the realistic maintenance plan is to track RELEASE-NOTES.md and the docs/ directory rather than assume a steady patch stream.
Editorial conclusion
Adopt ElasticJob if you have Java 8 or above, Maven 3.5.0 or above, and a ZooKeeper 3.6.0 or above ensemble you already operate, and you want one job definition to run across many executors with failover and misfire handling. Do not adopt it if you have no ZooKeeper, if your jobs fit inside one process, or if you need DAG-based job dependency, which the README still marks TODO. Before committing, verify two things: that the 3.0.5 release notes cover the upgrade path from your current version, and that your ZooKeeper version is actually 3.6.0 or above rather than the 3.4 line many older clusters still run.
Frequently asked questions
What is Apache ShardingSphere ElasticJob?
It is a Java distributed scheduled job framework that shards a job across multiple executors and coordinates them through a registry center. The README describes it as a lightweight, decentralized solution that provides distributed task sharding services, and it became an Apache ShardingSphere sub-project on May 28 2020.
How do I install ElasticJob?
It is a Java library rather than a server, so it is added as a Maven dependency; the repository ships a Maven wrapper at its root. The README states the requirements as Java 8 or above, Maven 3.5.0 or above, and ZooKeeper 3.6.0 or above.
Does ElasticJob require ZooKeeper?
Yes. The Environment Required section lists ZooKeeper 3.6.0 or above, and the registry-center module is where coordination state lives. The README does not name any alternative registry center.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/apache-shardingsphere-elasticjob)