scheduled-taskslisted
Install: claude install-skill rrezartprebreza/spring-boot-skills
# Scheduled Tasks
## Spring Boot 3 baseline
Use Framework 6 scheduling APIs and the project's Boot BOM; the template uses Java 17.
Reactive scheduled methods and virtual-thread scheduling require the appropriate Framework
6.1+/Boot 3.2+ baseline. Do not copy those features into older Boot 3 applications.
## Trigger contract
Establish schedule, time zone, maximum run duration, missed-run behavior and replica count
before choosing an implementation. Enable scheduling once. Spring cron has six fields,
including seconds. Specify a zone rather than relying on a deployment host default, and test
daylight-saving transitions when the business contract uses local time.
Fixed delay measures from completion; fixed rate follows a start-time cadence. Neither is a
cluster-wide lock. Adding @Async detaches completion from the scheduled invocation and can
allow overlapping work. Multiple scheduled declarations or bean instances can also duplicate
execution. Do not change an existing cadence just to hide a slow job.
[StaleOrderSchedule](templates/StaleOrderSchedule.java) is a thin, disabled-by-default cron
adapter. Supply a Clock and a SweepAction bean; enable @EnableScheduling in configuration.
[Good configuration](examples/good-schedule.yml) requires an explicit cron to enable it;
[the bad example](examples/bad-overlap.java) starts untracked duplicate work.
## Replicas and durable work
Every application instance can register the trigger. Decide whether all replicas may work,
one lea