Fixed Delay is a time-management and task-scheduling strategy where a specific, constant pause is enforced between the completion of one task execution and the beginning of the next. It is most widely recognized as a key configuration property (fixedDelay) in software frameworks like Spring Boot’s Task Scheduling.
Unlike schedules that trigger tasks at strict clock intervals, a fixed delay calculates its countdown only after the previous execution has completely finished. How It Works
If you configure a task with a fixedDelay of 5 seconds, the timeline adapts dynamically based on how long the task itself takes to run: Task 1 Starts: 12:00:00 Task 1 Finishes: 12:00:02 (Execution took 2 seconds) Delay Period: The scheduler waits exactly 5 seconds. Task 2 Starts: 12:00:07
If Task 2 runs longer and takes 10 seconds to finish, the subsequent 5-second pause pushes the next start time out accordingly, ensuring the system “breathes” between loads. Fixed Delay vs. Fixed Rate
The main alternative to a fixed delay is a fixed rate. They serve entirely different architectural purposes:
Leave a Reply