iluwatar / iluwatar/java-design-patterns

Scheduler pattern

Open
#76 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description

The Scheduler design pattern is a behavioral pattern used to manage the execution of tasks. This pattern is particularly useful in scenarios where tasks need to be executed at specific intervals or under specific conditions. The Scheduler pattern typically involves a scheduler component that manages task execution, a task component that defines the executable units of work, and a trigger or condition that initiates task execution.

Main elements of the Scheduler pattern:

  1. Scheduler: Manages the execution of tasks, determining when and how often they should run.
  2. Task: Represents the work to be performed, encapsulating the logic for execution.
  3. Trigger/Condition: Specifies the criteria or schedule for task execution, such as time intervals or specific events.
  4. Execution Context: Provides the environment in which tasks are executed, handling necessary resources and states.
References
Acceptance Criteria
  1. Implement the Scheduler component to manage and execute tasks based on defined triggers or conditions.
  2. Define and implement a Task interface that encapsulates the logic for various tasks.
  3. Create examples demonstrating the usage of the Scheduler pattern with different types of triggers/conditions and tasks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Project Contribution Guidelines and inspect existing design-pattern examples in the repository to understand its structure and conventions. Then determine the appropriate locations for the Scheduler, Task interface, and usage examples; done means tasks execute according to defined triggers or conditions and examples cover multiple trigger and task types.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.