зеркало из
				https://github.com/iharh/notes.git
				synced 2025-11-04 07:36:08 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			26 строки
		
	
	
		
			902 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			26 строки
		
	
	
		
			902 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)
 | 
						|
https://en.wikipedia.org/wiki/ISO_8601#Durations
 | 
						|
    @Scheduled(fixedDelay = ${interval})
 | 
						|
 | 
						|
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 {
 | 
						|
    ...
 | 
						|
}
 |