Spring scheduling task – run only once

Dead man’s solution:

@Scheduled(initialDelay = 1000 * 30, fixedDelay=Long.MAX_VALUE)

You will be dead before it fires again.

Leave a Comment