Spring @Scheduled annotation random delay
问题 I am using the @Scheduled annotation from Spring framework to invoke a method. But I have multiple nodes in my setup and I do not want them to all run at exactly the same time. So I'd like to set a random value to the initial delay to offset them from each other. import org.springframework.scheduling.annotation.Scheduled; @Scheduled(fixedRate = 600000, initialDelay = <random number between 0 and 10 minutes> ) Unfortunately, I am only allowed to use a constant expression here. Is there any