intermediateScheduling with @Scheduled

Why does @Scheduled run on a single shared thread by default, and why does that matter?

Spring's default scheduler uses one thread for all @Scheduled methods, so one slow-running scheduled task delays every other scheduled task in the application — fixed by configuring a dedicated TaskScheduler bean with an appropriately sized thread pool.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to If you deploy 3 replicas of a service with a nightly @Scheduled job, how many times does it actually run?← Back to all Spring Boot questions