Interface CronConfig

All Superinterfaces:
Prototype.Api, Prototype.Factory<Cron>, TaskConfig
All Known Implementing Classes:
CronConfig.BuilderBase.CronConfigImpl

public interface CronConfig extends Prototype.Api, TaskConfig
Interface generated from definition. Please add javadoc to the definition interface.
See Also:
  • Method Details

    • builder

      static CronConfig.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static CronConfig.Builder builder(CronConfig instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static CronConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • expression

      String expression()
      Cron expression for specifying period of execution.

      Examples:

      • 0/2 * * * * ? * - Every 2 seconds
      • 0 45 9 ? * * - Every day at 9:45
      • 0 15 8 ? * MON-FRI - Every workday at 8:15
      Returns:
      cron expression
    • concurrentExecution

      boolean concurrentExecution()
      Allow concurrent execution if previous task didn't finish before next execution. Default value is true.
      Returns:
      true for allow concurrent execution.
    • task

      Task to be scheduled for execution.
      Returns:
      scheduled for execution
    • executor

      Custom ScheduledExecutorService used for executing scheduled task.
      Returns:
      custom ScheduledExecutorService