- java.lang.Object
-
- io.helidon.scheduling.Scheduling
-
public class Scheduling extends Object
Scheduling periodically executed task with specified fixed rate or cron expression.Scheduling.fixedRate() .delay(2) .task(inv -> System.out.println("Executed every 2 seconds")) .build();
Scheduling.cron() .expression("0 45 9 ? * *") .task(inv -> System.out.println("Executed every day at 9:45")) .build()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Scheduling.CronBuilder
Builder for task executed periodically according to provided cron expression.static class
Scheduling.FixedRateBuilder
Builder for task executed periodically at a fixed rate.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Scheduling.CronBuilder
cronBuilder()
Build a task executed periodically according to provided cron expression.static Scheduling.FixedRateBuilder
fixedRateBuilder()
Build a task executed periodically at a fixed rate.
-
-
-
Method Detail
-
fixedRateBuilder
public static Scheduling.FixedRateBuilder fixedRateBuilder()
Build a task executed periodically at a fixed rate.- Returns:
- this builder
-
cronBuilder
public static Scheduling.CronBuilder cronBuilder()
Build a task executed periodically according to provided cron expression.- Returns:
- this builder
-
-