Package org.opends.server.backends.task
Class RecurringTask
java.lang.Object
org.opends.server.backends.task.RecurringTask
This class defines a information about a recurring task, which will be used to repeatedly schedule tasks for
processing.
It also provides some static methods that allow to validate strings in crontab (5) format.
It also provides some static methods that allow to validate strings in crontab (5) format.
-
Constructor Summary
ConstructorDescriptionRecurringTask
(ServerContext serverContext, TaskScheduler taskScheduler, Entry recurringTaskEntry) Creates a new recurring task based on the information in the provided entry. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the entry containing the data for this recurring task.Retrieves the unique ID assigned to this recurring task.static void
parseTaskTab
(String taskSchedule) Parse and validate recurring task schedule.scheduleNextIteration
(Instant dateAndTimeToSchedule) Schedules the next iteration of this recurring task for processing.
-
Constructor Details
-
RecurringTask
public RecurringTask(ServerContext serverContext, TaskScheduler taskScheduler, Entry recurringTaskEntry) throws LdapException Creates a new recurring task based on the information in the provided entry.- Parameters:
serverContext
- The server context.taskScheduler
- A reference to the task scheduler that may be used to schedule new tasks.recurringTaskEntry
- The entry containing the information to use to define the task to process.- Throws:
LdapException
- If the provided entry does not contain a valid recurring task definition.
-
-
Method Details
-
getRecurringTaskID
Retrieves the unique ID assigned to this recurring task.- Returns:
- The unique ID assigned to this recurring task.
-
getRecurringTaskEntry
Retrieves the entry containing the data for this recurring task.- Returns:
- The entry containing the data for this recurring task.
-
scheduleNextIteration
Schedules the next iteration of this recurring task for processing.- Parameters:
dateAndTimeToSchedule
- date and time to schedule next iteration from.- Returns:
- The task that has been scheduled for processing.
- Throws:
LdapException
- to indicate an error.
-
parseTaskTab
Parse and validate recurring task schedule.- Parameters:
taskSchedule
- recurring task schedule tab in crontab(5) format.- Throws:
LdapException
- to indicate an error.
-