Class Scheduling

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()
 
  • Method Details

    • fixedRateBuilder

      @Deprecated(since="4.0.2", forRemoval=true) public static Scheduling.FixedRateBuilder fixedRateBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use fixedRate() instead
      Build a task executed periodically at a fixed rate.
      Returns:
      this builder
    • fixedRate

      public static FixedRateConfig.Builder fixedRate()
      Build a task executed periodically at a fixed rate.
      Returns:
      this builder
    • cronBuilder

      @Deprecated(since="4.0.2", forRemoval=true) public static Scheduling.CronBuilder cronBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use cron() instead
      Build a task executed periodically according to provided cron expression.
      Returns:
      this builder
    • cron

      public static CronConfig.Builder cron()
      Build a task executed periodically according to provided cron expression.
      Returns:
      this builder