Skip to content

[FEATURE] Configure thread pool scheduler for scheduled tasks #239

@aniebietafia

Description

@aniebietafia

Problem

The application uses @EnableScheduling on the main application class but does not configure a custom task scheduler. By default, Spring uses a single-threaded task scheduler. If one scheduled task blocks or takes a long time to run, it delays the execution of all other scheduled tasks.

Proposed Solution

Create a SchedulingConfig class that registers a ThreadPoolTaskScheduler bean with a configured pool size (e.g. 5–10 threads).

User Stories

  • As a maintainer, I want scheduled tasks to run concurrently so that a delay in one task does not block other scheduled processes.

Acceptance Criteria

  • Class SchedulingConfig is created.
  • A ThreadPoolTaskScheduler is configured.
  • Concurrent execution of scheduled tasks is verified.

Tasks

  • Implement SchedulingConfig.java.
  • Remove @EnableScheduling from the main application class.
  • Verify that tasks execute concurrently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions