Interface Task


public interface Task
A discrete unit of work within a TaskScript. Tasks are evaluated by priority; the first that validates is executed.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Executes this task.
    Display name for logging/debugging.
    default int
    Higher priority tasks are checked first.
    boolean
    Returns true if this task should execute on the current loop iteration.
  • Method Details

    • name

      String name()
      Display name for logging/debugging.
    • validate

      boolean validate()
      Returns true if this task should execute on the current loop iteration.
    • execute

      int execute()
      Executes this task. Returns the loop delay in milliseconds, or -1 to stop the script.
    • priority

      default int priority()
      Higher priority tasks are checked first. Default is 0.