Ihar Hancharenka 907d33d69b m
2025-01-08 13:42:39 +03:00

24 строки
812 B
Plaintext

https://spring.io/guides/gs/scheduling-tasks/
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/annotation/Scheduled.html
at main app
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/annotation/EnableScheduling.html
later...
@Scheduled(initialDelay = ONE_SECOND, fixedDelay = ONE_MINUTE)
2021
https://reflectoring.io/spring-scheduler/
https://github.com/thombergs/code-examples/tree/master/spring-boot/spring-boot-scheduler
samples
@ConditionalOnProperty(value = "app.scheduling.enabled", havingValue = "true", matchIfMissing = true)
@Configuration
@EnableScheduling
public class SchedulingConfig {
...
}