Spring boot scheduling
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/spring-boot-scheduling
Standards for scheduled tasks and distributed locking with ShedLock. Use when implementing @Scheduled tasks or distributed locking with ShedLock in Spring Boot. (triggers: **/*Scheduler.java, **/*Job.java, scheduled, shedlock, cron)From its SKILL.md
npx -y skills add ComeOnOliver/skillshub --skill spring-boot-schedulingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.2 KB, 237 tokens by cl100k_base, as published. Nobody here has run it
Spring Boot Scheduling Standards
Priority: P0
Implementation Guidelines
Scheduled Tasks
- ThreadPool: ALWAYS configure a dedicated
TaskScheduler(default is 1 thread). Enable with@EnableSchedulingannotation. - Async: Keep
@Scheduledmethods light; offload to@Async/Queues. Wrap logic in try/catch; log errors and use@Retryablefor retry on transient failures.
Distributed Locking (ShedLock)
- Problem:
@Scheduledruns on ALL pods in K8s. - Solution: Use ShedLock to guarantee single execution.
- Config: Set
lockAtMostFor(deadlock safety) andlockAtLeastFor(debounce).
Anti-Patterns
- No Default Pool: Configure dedicated TaskScheduler (default is 1 thread).
- No duplicates: Use ShedLock for distributed cron in multi-pod deployments.
- No task state: Design tasks to be idempotent; assume pod can restart.
References
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.