Skip to content

Commit 4fd2e94

Browse files
feat: Update scheduling method to use fixed rate for repeated execution in SchedulerUtil
Signed-off-by: Mario Serrano <mario@dynamiasoluciones.com>
1 parent 0d4a858 commit 4fd2e94

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

integration/src/main/java/tools/dynamia/integration/scheduling/SchedulerUtil.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,14 @@ public static boolean isSchedulingEnabled() {
307307
}
308308

309309
/**
310-
* Schedule a task with fixed delay using Spring TaskScheduler
310+
* Schedule a task at fixed rate using Spring TaskScheduler for repeated execution.
311311
*
312-
* @param delay the delay
313-
* @param task the task
312+
* @param rate the rate
313+
* @param task the task to repeat each period
314314
* @return the scheduled future
315315
*/
316-
public static ScheduledFuture<?> scheduleWithFixedDelay(Duration delay, Runnable task) {
317-
return getTaskScheduler().scheduleAtFixedRate(task, delay);
316+
public static ScheduledFuture<?> scheduleAtFixedRate(Duration rate, Runnable task) {
317+
return getTaskScheduler().scheduleAtFixedRate(task, rate);
318318
}
319319

320320
/**

0 commit comments

Comments
 (0)