Treat a scheduled task as restartable and idempotent. Keep the `@Scheduled` method light, hand long-running work to `@Async` or a durable queue, and configure a dedicated `TaskScheduler` rather than relying on the default one-thread pool. Wrap the boundary in explicit failure handling: ```java @Scheduled(fixedDelayString = "${jobs.reconcile-delay}") void run() { try { reconcile(); } catch (TransientException ex) { log.warn("reconcile failed; retry will be attempted", ex); throw ex; } catch (E...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill spring-boot-scheduling --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Spring Boot Scheduling?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-spring-boot-scheduling-b5225b2b)More formats (shields.io, HTML) on the badges page.
Treat a scheduled task as restartable and idempotent. Keep the `@Scheduled` method light, hand long-running work to `@Async` or a durable queue, and configure a dedicated `TaskScheduler` rather than relying on the default one-thread pool. Wrap the boundary in explicit failure handling:
```java
@Scheduled(fixedDelayString = "${jobs.reconcile-delay}")
void run() {
try {
reconcile();
} catch (TransientException ex) {
log.warn("reconcile failed; retry will be attempted", ex);
throw ex;
} catch (Exception ex) {
log.error("reconcile failed", ex);
}
}
```
Use `@Retryable` for bounded retries of known transient failures, with backoff; do not retry permanent validation or authorization failures. Record enough structured context to diagnose a failed run and alert after retry exhaustion. In a multi-pod deployment, use ShedLock with finite `lockAtMostFor` and suitable `lockAtLeastFor` if only one pod may execute. Test failure, retry, overlap, pod restart, and duplicate-delivery cases. Never log and silently swallow an exception without deciding whether the job is complete, retryable, or failed.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!