Package com.logicaldoc.core.task
Class TaskScheduling
- java.lang.Object
-
- com.logicaldoc.core.task.TaskScheduling
-
public class TaskScheduling extends Object
Scheduling configuration for a Task- Since:
- 3.5.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description TaskScheduling(String taskName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCronExpression()
long
getDelay()
long
getDelaySeconds()
long
getInterval()
long
getIntervalSeconds()
long
getMaxLength()
The maximum duration expressed in secondsString
getMode()
Date
getNextFireTime()
Date
getPreviousFireTime()
String
getTaskName()
boolean
isEnabled()
void
load()
Loads scheduling configurations from persistent storagevoid
save()
Saves scheduling configurations in the persistent storagevoid
setCronExpression(String cronExpression)
void
setDelay(long delay)
void
setDelaySeconds(long delay)
void
setEnabled(boolean enabled)
void
setInterval(long interval)
void
setIntervalSeconds(long interval)
void
setMaxLength(long maxLength)
void
setMode(String mode)
void
setPreviousFireTime(Date previousFireTime)
String
toString()
-
-
-
Constructor Detail
-
TaskScheduling
public TaskScheduling(String taskName)
-
-
Method Detail
-
getTaskName
public String getTaskName()
-
getPreviousFireTime
public Date getPreviousFireTime()
-
setPreviousFireTime
public void setPreviousFireTime(Date previousFireTime)
-
getMaxLength
public long getMaxLength()
The maximum duration expressed in seconds- Returns:
- the maximpum duration in seconds
-
setMaxLength
public void setMaxLength(long maxLength)
-
getNextFireTime
public Date getNextFireTime()
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
load
public void load() throws IOException, ParseException
Loads scheduling configurations from persistent storage- Throws:
IOException
- error reading the configuration fileParseException
- error parsing the scheduling expression
-
save
public void save() throws IOException, ParseException
Saves scheduling configurations in the persistent storage- Throws:
IOException
- raised is an I/O problem occursParseException
- raised if the scheduling expression is invalid
-
getMode
public String getMode()
-
setMode
public void setMode(String mode)
-
getDelay
public long getDelay()
-
getDelaySeconds
public long getDelaySeconds()
-
setDelay
public void setDelay(long delay)
-
setDelaySeconds
public void setDelaySeconds(long delay)
-
getInterval
public long getInterval()
-
getIntervalSeconds
public long getIntervalSeconds()
-
setInterval
public void setInterval(long interval)
-
setIntervalSeconds
public void setIntervalSeconds(long interval)
-
getCronExpression
public String getCronExpression()
-
setCronExpression
public void setCronExpression(String cronExpression)
-
-