Interface ScheduleTask

All Known Subinterfaces:
DeployTask, GenerateTask, MailTask, ProjectBackupTask, ProjectBackupTask2, ScriptTask

public interface ScheduleTask
A single task to be executed within a scheduled job.
Since:
4.0
  • Method Details

    • getName

      @NotNull String getName()
      Returns the name of this task.
      Since:
      4.0
    • setName

      void setName(@NotNull String value)
      Provide the name of this task.
      Parameters:
      value - The name of this task.
      Since:
      4.0
    • getDescription

      @Nullable String getDescription()
      Returns the description of this task.
      Since:
      4.0
    • setDescription

      void setDescription(@Nullable String value)
      Provide the description of this task.
      Parameters:
      value - The description of this task.
      Since:
      4.0
    • isProjectTask

      boolean isProjectTask()
      Returns true if this ScheduleTask is allowed to be used in project context only, false if server context execution is allowed also.
      Note: Project belonging of this ScheduleTask can be identified by calling getScheduleEntry().isProjectSchedule() or getScheduleEntry().getProject().
      Since:
      4.0
    • getScheduleEntry

      ScheduleEntry getScheduleEntry()
      Returns the ScheduleEntry this task belongs to.
      Since:
      4.0
      See Also:
    • checkParams

      @NotNull List<String> checkParams()
      Returns an empty list, if all params are ok, or a list with complaints, each prefixed with getName().
      Since:
      4.0
    • test

      Returns the test result of this task.
      Since:
      4.0
    • getExecuteParallel

      boolean getExecuteParallel()
      Returns true if this task is allowed to be executed parallel, false otherwise.
      Since:
      4.0
    • setExecuteParallel

      void setExecuteParallel(boolean value)
      Provide true if this task should be allowed to be executed parallel, false otherwise.
      Parameters:
      value - true if this task should be allowed to be executed parallel, false otherwise.
      Since:
      4.0
    • isActive

      boolean isActive()
      Returns true if this task is active, false otherwise.
      Since:
      4.0
    • setActive

      void setActive(boolean value)
      Provide true if this task should be active, false otherwise.
      Parameters:
      value - true if this task should be active, false otherwise.
      Since:
      4.0
    • hasTemplate

      boolean hasTemplate()
      Returns true if this task uses a ScheduleTaskTemplate, false otherwise (default).
      Since:
      4.0
      See Also:
    • getTemplate

      Returns the ScheduleTaskTemplate this task uses.
      Since:
      4.0
      See Also:
    • setTemplate

      void setTemplate(@Nullable ScheduleTaskTemplate template)
      Provide the ScheduleTaskTemplate this task should use.
      Parameters:
      template - a ScheduleTaskTemplate.
      Since:
      4.0
      See Also:
    • isExecuteOnClusterNode

      boolean isExecuteOnClusterNode()
      Should the task execution run on a cluster node? This is only supported when the feature "clustering" is licensed and getRemoteTaskType() is not RemoteTaskType.NONE.
      Since:
      4.0.48
      See Also:
    • setExecuteOnClusterNode

      void setExecuteOnClusterNode(boolean value)
      Switch if the task execution should run on a cluster node. This is only supported when the feature "clustering" is licensed.
      Since:
      4.0.48
      See Also:
    • getClusterNodeName

      String getClusterNodeName()
      If the task execution should run on a cluster node a node may be specified for execution. If no node is specified the execution will happen on the node with the least load.
      Since:
      4.0.48
      See Also:
    • setClusterNodeName

      void setClusterNodeName(String value)
      Defines the name of the cluster node.
      Parameters:
      value - The name.
      Since:
      4.0.48
    • getRemoteTaskType

      @NotNull RemoteTaskType getRemoteTaskType()
      Returns the type of remote task - if the task is executed remote a valid cluster node is choosen according to this type.
      Default is RemoteTaskType.NONE - these indicates that the task cannot be executed on a cluster node.
      Since:
      4.1.36
    • getExecuteInFault

      boolean getExecuteInFault()
      Returns true if this task is to be executed even on previous errors, false to be skipped.
      Since:
      4.0.49
    • setExecuteInFault

      void setExecuteInFault(boolean value)
      Provide true if this task is to be executed even on previous errors, false to be skipped.
      Since:
      4.0.49