Class 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 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