Interface ScheduleTask
- All Known Subinterfaces:
DeployTask,GenerateTask,MailTask,MaintenanceModeTask,ProjectBackupTask,ProjectBackupTask2,ProjectCleanupTask,ScriptTask
public interface ScheduleTask
A single task to be executed within a
scheduled job.- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list, if all params are ok, or a list with complaints, each prefixed withgetName().Deprecated.@Nullable StringReturns the description of this task.booleanReturnstrueif this task is to be executed even on previous errors,falseto be skipped.booleanReturnstrueif this task is allowed to be executed parallel,falseotherwise.@NotNull StringgetName()Returns the name of this task.@NotNull RemoteTaskTypeReturns the type of remote task - if the task is executed remote a valid cluster node is choosen according to this type.
Default isRemoteTaskType.NONE- these indicates that the task cannot be executed on a cluster node.Returns theScheduleEntrythis task belongs to.@Nullable ScheduleTaskTemplateReturns theScheduleTaskTemplatethis task uses.booleanReturnstrueif this task uses aScheduleTaskTemplate,falseotherwise (default).booleanisActive()Returnstrueif this task is active,falseotherwise.booleanDeprecated.since 5.2.240708 no replacement, always returnstrue.booleanReturnstrueif thisScheduleTaskis allowed to be used in project context only,falseif server context execution is allowed also.
Note: Project belonging of thisScheduleTaskcan be identified by callinggetScheduleEntry().isProjectSchedule()orgetScheduleEntry().getProject().voidsetActive(boolean value) Providetrueif this task should be active,falseotherwise.voidsetClusterNodeName(String value) Deprecated.since 5.2.240708 no replacement, does nothing.voidsetDescription(@Nullable String value) Provide the description of this task.voidsetExecuteInFault(boolean value) Providetrueif this task is to be executed even on previous errors,falseto be skipped.voidsetExecuteOnClusterNode(boolean value) Deprecated.since 5.2.240708 no replacement, does nothing.voidsetExecuteParallel(boolean value) Providetrueif this task should be allowed to be executed parallel,falseotherwise.voidProvide the name of this task.voidsetTemplate(@Nullable ScheduleTaskTemplate template) Provide theScheduleTaskTemplatethis task should use.test()Returns the test result of this task.
-
Method Details
-
getName
Returns the name of this task.- Since:
- 4.0
-
setName
Provide the name of this task.- Parameters:
value- The name of this task.- Since:
- 4.0
-
getDescription
Returns the description of this task.- Since:
- 4.0
-
setDescription
Provide the description of this task.- Parameters:
value- The description of this task.- Since:
- 4.0
-
isProjectTask
boolean isProjectTask()Returnstrueif thisScheduleTaskis allowed to be used in project context only,falseif server context execution is allowed also.
Note: Project belonging of thisScheduleTaskcan be identified by callinggetScheduleEntry().isProjectSchedule()orgetScheduleEntry().getProject().- Since:
- 4.0
-
getScheduleEntry
ScheduleEntry getScheduleEntry()Returns theScheduleEntrythis task belongs to.- Since:
- 4.0
- See Also:
-
checkParams
Returns an empty list, if all params are ok, or a list with complaints, each prefixed withgetName().- Since:
- 4.0
-
test
ScheduleTaskTestResult test()Returns the test result of this task.- Since:
- 4.0
-
getExecuteParallel
boolean getExecuteParallel()Returnstrueif this task is allowed to be executed parallel,falseotherwise.- Since:
- 4.0
-
setExecuteParallel
void setExecuteParallel(boolean value) Providetrueif this task should be allowed to be executed parallel,falseotherwise.- Parameters:
value-trueif this task should be allowed to be executed parallel,falseotherwise.- Since:
- 4.0
-
isActive
boolean isActive()Returnstrueif this task is active,falseotherwise.- Since:
- 4.0
-
setActive
void setActive(boolean value) Providetrueif this task should be active,falseotherwise.- Parameters:
value-trueif this task should be active,falseotherwise.- Since:
- 4.0
-
hasTemplate
boolean hasTemplate()Returnstrueif this task uses aScheduleTaskTemplate,falseotherwise (default).- Since:
- 4.0
- See Also:
-
getTemplate
Returns theScheduleTaskTemplatethis task uses.- Since:
- 4.0
- See Also:
-
setTemplate
Provide theScheduleTaskTemplatethis task should use.- Parameters:
template- aScheduleTaskTemplate.- Since:
- 4.0
- See Also:
-
isExecuteOnClusterNode
Deprecated.since 5.2.240708 no replacement, always returnstrue.Should the task execution run on a cluster node? This is only supported when the feature "clustering" is licensed andgetRemoteTaskType()is notRemoteTaskType.NONE.- Since:
- 4.0.48
- See Also:
-
setExecuteOnClusterNode
Deprecated.since 5.2.240708 no replacement, does nothing.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
Deprecated.since 5.2.240708 no replacement, always returnsnull.If the task executionshould run on a cluster nodea 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
Deprecated.since 5.2.240708 no replacement, does nothing.Defines the name of the cluster node.- Parameters:
value- The name.- Since:
- 4.0.48
-
getRemoteTaskType
Returns the type of remote task - if the task is executed remote a valid cluster node is choosen according to this type.
Default isRemoteTaskType.NONE- these indicates that the task cannot be executed on a cluster node.- Since:
- 4.1.36
-
getExecuteInFault
boolean getExecuteInFault()Returnstrueif this task is to be executed even on previous errors,falseto be skipped.- Since:
- 4.0.49
-
setExecuteInFault
void setExecuteInFault(boolean value) Providetrueif this task is to be executed even on previous errors,falseto be skipped.- Since:
- 4.0.49
-
null.