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

Modifier and Type
Method
Description
`String`
`getCronExpression()`
`long`
`getDelay()`
`long`
`getDelaySeconds()`
`long`
`getInterval()`
`long`
`getIntervalSeconds()`
`long`
`getLastDuration()`
`long`
`getMaxLength()`
The maximum duration expressed in seconds
`String`
`getMode()`
`Date`
`getNextFireTime()`
`Date`
`getPreviousFireTime()`
`String`
`getTaskName()`
`boolean`
`isEnabled()`
`void`
`load()`
Loads scheduling configurations from persistent store
`void`
`save()`
Saves scheduling configurations in the persistent store
`void`
`setCronExpression(String cronExpression)`
`void`
`setDelay(long delay)`
`void`
`setDelaySeconds(long delay)`
`void`
`setEnabled(boolean enabled)`
`void`
`setInterval(long interval)`
`void`
`setIntervalSeconds(long interval)`
`void`
`setLastDuration(long lastDuration)`
`void`
`setMaxLength(long maxLength)`
`void`
`setMode(String mode)`
`void`
`setPreviousFireTime(Date previousFireTime)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### TaskScheduling

public TaskScheduling(String taskName)

## Method Details

### 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 store

Throws:
  `IOException` - error reading the configuration file
  `ParseException` - error parsing the scheduling expression

### save

public void save() throws IOException, ParseException
Saves scheduling configurations in the persistent store

Throws:
  `IOException` - raised is an I/O problem occurs
  `ParseException` - raised if the scheduling expression is invalid

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### 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)

### getLastDuration

public long getLastDuration()

### setLastDuration

public void setLastDuration(long lastDuration)