Skip to content
Back to skills

Spring Boot Scheduling

ASecurity

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...

  • 584 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
developmentjava

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill spring-boot-scheduling --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Spring Boot Scheduling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-spring-boot-scheduling-b5225b2b/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-spring-boot-scheduling-b5225b2b)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
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.


Files in this skill

  • eval-1.baseline.md643 B
  • eval-1.with-skill.md1.2 KB
  • eval-2.baseline.md693 B
  • eval-2.with-skill.md1.1 KB
  • eval-3.baseline.md760 B
  • eval-3.with-skill.md1.1 KB
  • trigger-1.md110 B
  • trigger-2.md98 B
  • trigger-3.md100 B
  • trigger-4.md100 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.