It seems that ThreadPoolTaskScheduler delegates the actual scheduling to ScheduledThreadPoolExecutor which is prone to clock drift problems. See this blog post for some details.

Comment From: sbrannen

Thanks for bringing this to our attention.

As pointed out in the Stack Overflow discussion you linked from your blog, this does not appear to be an issue on Linux and seems to primarily affect older versions of Microsoft Windows.

In light of that, we are moving this to the general backlog.

If the issue gains interest from the community, we may consider providing a solution that works with Spring, but we likely would not change the existing behavior of ThreadPoolTaskScheduler.

Comment From: jhoeller

We are not aware of concrete clock drift problems in production environments, in particular not on our new JDK 17+ baseline, so we keep building on ScheduledThreadPoolExecutor for the time being