Quick revision
The short answer
Embedded Quartz lets each team own its jobs and ship them with the service, but every team then runs its own QRTZ tables, clustering and monitoring. A central scheduling service gives one place for triggers, calendars, history and alerting, and separates triggering from execution so services stay stateless, but it becomes shared critical infrastructure that needs high availability and an owning team. For 50 teams, the usual answer is a combination: central triggering for business jobs, and local @Scheduled with ShedLock for housekeeping.
What to remember
In this answer, we compared embedded Quartz, which gives teams ownership but multiplies QRTZ tables, clustering and monitoring by 50, with a central scheduling service, which gives one place for triggers, calendars, history and alerting and keeps services stateless by separating triggering from execution. We saw that the central service becomes critical shared infrastructure needing high availability and an owning team, and that most organisations combine the two: central triggering for business jobs, local ShedLock for housekeeping, written down as a standard.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Embedded Quartz lets each team own its jobs and ship them with the service, but every team then runs its own QRTZ tables, clustering and monitoring. A central scheduling service gives one place for triggers, calendars, history and alerting, and separates triggering from execution so services stay stateless, but it becomes shared critical infrastructure that needs high availability and an owning team. For 50 teams, the usual answer is a combination: central triggering for business jobs, and local @Scheduled with ShedLock for housekeeping.
Why this question is asked
With 50 teams, scheduling choices stop being a technical detail of each service and start shaping how the organisation operates: who gets paged when a job fails, how an auditor finds the history of a payment run, how much undifferentiated work every team carries. Interviewers ask this design comparison to see whether we can weigh autonomy against consistency and see the costs on both sides, not just the features. In this answer, we will look at what embedded Quartz really costs at scale, what a central service changes, the design that keeps a central service manageable, its risks, and the combined model most organisations end up with.
1Embedded Quartz: Ownership and Duplication
In the embedded model, each team adds spring-boot-starter-quartz to its service, defines JobDetail and Trigger beans, and deploys schedules together with the code. That is real autonomy: a team can change a schedule in the same pull request as the job, test it locally and roll it back with the service. Nobody else is involved, and an outage of one team's scheduler affects only that team.
At 50 teams, the costs multiply. Each team needs its own QRTZ tables, usually in its own database, with migrations for Quartz upgrades. Each must configure clustering, thread pools and misfire instructions correctly, which, as many incidents show, is easy to get wrong. Each builds its own run history and alerting, because Quartz has none built in. And nobody can answer simple organisation-wide questions, such as 'which jobs run at midnight' or 'which jobs failed last night', without visiting 50 systems.
2A Central Scheduling Service
A central service owns all schedules in one place. Teams register jobs with it through an API or configuration: name, owner, schedule, calendar, dependencies and how to trigger the work. The service fires triggers, records every run, and alerts the owner on failure or on a missed run. Because it sees all jobs, it can offer features that are impossible locally: dependencies across teams ('start the settlement export after both ledger jobs succeeded'), shared business calendars, one history for audit and one dashboard for operations.
Most importantly, it separates triggering from execution. The service decides when; the team's service decides how and does the work.
- Central schedulerschedules, calendars, dependencies, history, alerting
- Trigger contractHTTP call or message with execution id and business date
- Team servicesstateless endpoints or consumers that do the work idempotently
- Team databasesbusiness data; no QRTZ tables needed
4 layers, from the top down. Step through them one at a time.
Teams keep their code; the platform keeps the clock and the record.
3Keeping Services Stateless
With a central scheduler, a team's service no longer contains a scheduler. It exposes an endpoint or consumes a message, such as POST /jobs/invoice-export/executions with an execution id and the business date, does the work and reports the result. The service holds no QRTZ tables, no locks and no scheduler threads, so it can be scaled, restarted and deployed freely. The execution id lets it ignore a repeated trigger, which makes retries from the scheduler safe.
This is also what keeps the platform small. It never runs business code and never needs the teams' dependencies, so it is a scheduling system, not a second application server.
4The Costs of Going Central
The central service becomes shared critical infrastructure. If it is down at 01:00, every team's jobs miss their runs at once, so it needs high availability across zones, careful change management, and an owning team with on-call and a published SLO, for example 'triggers fire within 30 seconds of their time, 99.95 percent of the time'. That team is a permanent cost, typically several engineers, plus the product, open-source system or vendor licence underneath.
Teams also lose some autonomy: a schedule change becomes an API call or a configuration change in another system, and local development needs a way to trigger jobs without the platform. A good platform reduces this with self-service configuration kept in each team's repository and a simple local trigger.
| Embedded Quartz | Central scheduler | |
|---|---|---|
| Who owns schedules | each team, in its service | teams, registered centrally |
| Infrastructure | QRTZ tables and clustering x 50 | one platform, HA, owning team |
| History and alerting | built by each team | built once, consistent |
| Cross-team dependencies | not possible | supported |
| Blast radius of an outage | one team | every team using it |
| Service state | scheduler inside the service | stateless endpoint or consumer |
5The Combined Model
Most organisations of this size end up combining the two, because the job classes have different needs. Business jobs, those that are financial, regulated, customer-facing, calendar-driven or dependent on other teams' jobs, are triggered centrally, where history, dependencies and alerting pay for themselves. Housekeeping, such as cache refreshes, cleanup and short local syncs, stays in the services with @Scheduled and ShedLock, where a central trigger would add a network hop and a dependency for no gain. Teams with existing embedded Quartz move their business jobs in waves and may keep Quartz for local work until it is worth simplifying.
The decision rule should be written down as a standard, with the job classes and their target option, so each team can apply it in a review without a debate. With 50 teams, a clear rule applied consistently is worth more than the theoretically best tool for each job.
6Follow-up questions
Is a central scheduler a single point of failure?
It can be, which is why it must be built and run like any critical service: several instances across zones, a replicated store, tested failover and an SLO. Keeping execution in the services limits the damage, because a scheduler outage delays triggers but does not lose the work, provided missed runs are detected and replayed afterwards.
How do teams test jobs locally with a central scheduler?
Because the job is just an endpoint or a message consumer, a developer can call the endpoint directly with a test execution id, or run a small local trigger script. Integration tests do the same, which is simpler than testing Quartz triggers inside the service.
Would you migrate all embedded Quartz jobs at once?
No. I would start with the jobs that benefit most, such as audited or cross-team jobs, in waves, removing each old trigger when its central replacement is live so there is never a period with two triggers. Housekeeping jobs may never need to move.
7Conclusion
In this answer, we compared embedded Quartz, which gives teams ownership but multiplies QRTZ tables, clustering and monitoring by 50, with a central scheduling service, which gives one place for triggers, calendars, history and alerting and keeps services stateless by separating triggering from execution. We saw that the central service becomes critical shared infrastructure needing high availability and an owning team, and that most organisations combine the two: central triggering for business jobs, local ShedLock for housekeeping, written down as a standard.
Open with
With embedded Quartz each team owns its schedules and deploys them with the service, which is real autonomy and a small blast radius. But at 50 teams that's 50 sets of QRTZ tables, 50 clustering and misfire configurations to get right, and 50 home-grown histories and alerting setups, and nobody can see all jobs in one place.
Then, if they want more
A central scheduler gives one place for triggers, calendars, history and alerting, and can handle cross-team dependencies, which embedded Quartz can't.
The design I'd insist on is separating triggering from execution: the scheduler sends an HTTP call or a message with an execution id and business date, and the service does the work idempotently, so services stay stateless, with no scheduler, locks or Quartz tables inside them.
The cost is that the central service becomes shared critical infrastructure: it needs high availability, an owning team on call and an SLO, and teams give up some local control. So I'd combine them. Business jobs, meaning financial, regulated, calendar-driven or cross-team, are triggered centrally. Housekeeping like cache refreshes stays local with @Scheduled and ShedLock.
I'd write that rule down as the standard and migrate business jobs in waves.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Batch reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Your organisation is deciding whether teams should embed Quartz in their Spring Boot...": https://scrivio-interview-library.netlify.app/spring-boot/scheduling/0e772e024c/