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 String
Returns the description of this task.boolean
Returnstrue
if this task is to be executed even on previous errors,false
to be skipped.boolean
Returnstrue
if this task is allowed to be executed parallel,false
otherwise.@NotNull String
getName()
Returns the name of this task.@NotNull RemoteTaskType
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.Returns theScheduleEntry
this task belongs to.@Nullable ScheduleTaskTemplate
Returns theScheduleTaskTemplate
this task uses.boolean
Returnstrue
if this task uses aScheduleTaskTemplate
,false
otherwise (default).boolean
isActive()
Returnstrue
if this task is active,false
otherwise.boolean
Deprecated.since 5.2.240708 no replacement, always returnstrue
.boolean
Returnstrue
if thisScheduleTask
is allowed to be used in project context only,false
if server context execution is allowed also.
Note: Project belonging of thisScheduleTask
can be identified by callinggetScheduleEntry().isProjectSchedule()
orgetScheduleEntry().getProject()
.void
setActive
(boolean value) Providetrue
if this task should be active,false
otherwise.void
setClusterNodeName
(String value) Deprecated.since 5.2.240708 no replacement, does nothing.void
setDescription
(@Nullable String value) Provide the description of this task.void
setExecuteInFault
(boolean value) Providetrue
if this task is to be executed even on previous errors,false
to be skipped.void
setExecuteOnClusterNode
(boolean value) Deprecated.since 5.2.240708 no replacement, does nothing.void
setExecuteParallel
(boolean value) Providetrue
if this task should be allowed to be executed parallel,false
otherwise.void
Provide the name of this task.void
setTemplate
(@Nullable ScheduleTaskTemplate template) Provide theScheduleTaskTemplate
this 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()Returnstrue
if thisScheduleTask
is allowed to be used in project context only,false
if server context execution is allowed also.
Note: Project belonging of thisScheduleTask
can be identified by callinggetScheduleEntry().isProjectSchedule()
orgetScheduleEntry().getProject()
.- Since:
- 4.0
-
getScheduleEntry
ScheduleEntry getScheduleEntry()Returns theScheduleEntry
this 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()Returnstrue
if this task is allowed to be executed parallel,false
otherwise.- Since:
- 4.0
-
setExecuteParallel
void setExecuteParallel(boolean value) Providetrue
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()Returnstrue
if this task is active,false
otherwise.- Since:
- 4.0
-
setActive
void setActive(boolean value) Providetrue
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()Returnstrue
if this task uses aScheduleTaskTemplate
,false
otherwise (default).- Since:
- 4.0
- See Also:
-
getTemplate
Returns theScheduleTaskTemplate
this task uses.- Since:
- 4.0
- See Also:
-
setTemplate
Provide theScheduleTaskTemplate
this 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 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
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()Returnstrue
if this task is to be executed even on previous errors,false
to be skipped.- Since:
- 4.0.49
-
setExecuteInFault
void setExecuteInFault(boolean value) Providetrue
if this task is to be executed even on previous errors,false
to be skipped.- Since:
- 4.0.49
-
null
.