0
votes

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?

1

1 Answers

1
votes

Use @Scheduled(fixedRate = 5000). You can also use a CRON expression @Scheduled(cron = "*/5 * * * * ?") but it seems like an overkill.