r/SpringBoot • u/LongCelebration4425 • Oct 31 '26
How-To/Tutorial I built a starter that discovers every @Scheduled and Quartz job and alerts you when one stops running
Scheduled jobs in Spring fail in the quietest way possible: an exception kills a cron thread, a pool gets starved, a property resolves to the wrong cron, and nothing tells you. You find out days later because a report or a backup is missing.
I've been building SilenceWatch, an open source heartbeat monitor, and its Spring Boot starter is the part I care about most. You add one dependency and an API key:
<dependency>
<groupId>com.silencewatch</groupId>
<artifactId>silencewatch-spring-boot-starter</artifactId>
<version>0.1.0</version>
</dependency>and in application.yml:
silencewatch:
api-key: ${SILENCEWATCH_API_KEY}On startup it finds every @Scheduled method and every Quartz job, declares each one with its resolved schedule (${backup.cron} becomes the actual expression), and reports every run with its duration and any exception. If a job doesn't run when it should, you get an email, Slack, Teams, Discord or webhook alert.
A few things I was strict about:
- It never fails or blocks your job: errors are swallowed and logged at WARN, and sending happens on a bounded queue in a background daemon thread.
- No key, no network or no server, and your app behaves exactly as without it.
silencewatch.enabled: falseturns it all off. - No Jackson or other heavy dependency forced on you.
- Stable job identity (
com.acme.jobs.BackupJob#run), so history survives restarts and redeploys. A job removed from the code is flagged orphaned, never deleted. - Staging and production show up as separate checks.
Java 17+, tested on Spring Boot 3.5 and 4.1. The server is Apache 2.0 and self-hostable with Docker Compose, free and without limits. There's also a hosted version with a free plan (10 checks).
Starter source: https://github.com/liliang-dev/SilenceWatch/tree/main/clients/java/spring-boot
Site: https://silencewatch.com/spring-boot/
I'd really like feedback from people running a lot of scheduled jobs. What breaks for you that this wouldn't catch?
3
u/Historical_Ad4384 Oct 31 '26
Micrometer observations with a grafana should also be able to achieve the same functionality
2
u/sereikis Oct 31 '26
for replicated deployments, document whether a check means "any instance ran this job" or "every instance ran it," and test one replica going silent while another keeps reporting. shared job identity can hide the first failure, but expecting every replica to run would be wrong for a clustered Quartz job with a single firing owner.
1
u/ducki666 Oct 31 '26
I don't get it.
Why jobs fail silent?
What's that api key?
1
u/messi_1988 29d ago
I am trying to create an account on app.silencewatch.com...tried creating a new Gmail account for testing this out for the API key and I keep getting error message An account already exists from this network..sign in to it or contact us if this connection so shared...how to resolve this..what does it mean
3
u/TurnstileT Oct 31 '26
Thanks, Claude.
1
u/therealkon__ Oct 31 '26
aahhh yes, purple
1
u/nian2326076 Nov 02 '26
For monitoring scheduled jobs effectively, ensure you're checking for misconfigured time zones or unlogged exceptions, as these are common pitfalls. Regular performance audits can help catch issues before they impact your system. If you're also looking for job opportunities in this field, you can use LandOffer to find relevant roles that match your skills.
0
u/[deleted] 28d ago
[removed] — view removed comment