I have a spring batch job with a @Scheduled(fixedDelay=5000) annotation. But it starts 5 seconds after the end of the previous execution. How can I start it 5 seconds after the start of the previous execution?
Use @Scheduled(fixedRate = 5000). You can also use a CRON expression @Scheduled(cron = "*/5 * * * * ?") but it seems like an overkill.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more