|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Concerns(value=UnitOfWorkConcern.class) public interface Scheduler
Scheduler.
This is the only interface you should use in your application for scheduling tasks.
See SchedulerConfiguration
for configuration properties.
See in SchedulerAssembler
how to assemble a Scheduler
and optional Timeline
.
By default, a Schedule
is not durable. In other words, it do not survive an Application
restart.
To make a Schedule
durable, set it's durable property to true once its scheduled.
Durable Schedule
s that have no future run are removed by SchedulerGarbageCollector
.
Method Summary | |
---|---|
Schedule |
schedule(Task task,
String cronExpression)
Schedule a Task using a CronExpression. |
Schedule |
schedule(Task task,
String cronExpression,
Date start)
Schedule a Task using a CronExpression starting at a given date. |
Schedule |
schedule(Task task,
String cronExpression,
long initialDelay)
Schedule a Task using a CronExpression with a given initial delay in milliseconds. |
Schedule |
scheduleOnce(Task task,
int initialSecondsDelay)
Schedule a Task to be run after a given initial delay in seconds. |
Method Detail |
---|
@UnitOfWorkPropagation(value=MANDATORY) Schedule scheduleOnce(Task task, int initialSecondsDelay)
task
- Task to be scheduled onceinitialSecondsDelay
- Initial delay the Task will be run after, in seconds
@UnitOfWorkPropagation(value=MANDATORY) Schedule schedule(Task task, String cronExpression)
task
- Task to be scheduled oncecronExpression
- CronExpression for creating the Schedule for the given Task
@UnitOfWorkPropagation(value=MANDATORY) Schedule schedule(Task task, String cronExpression, long initialDelay)
task
- Task to be scheduled oncecronExpression
- CronExpression for creating the Schedule for the given TaskinitialDelay
- Initial delay the Schedule will be active after, in milliseconds
@UnitOfWorkPropagation(value=MANDATORY) Schedule schedule(Task task, String cronExpression, Date start)
task
- Task to be scheduled oncecronExpression
- CronExpression for creating the Schedule for the given Taskstart
- Date from which the Schedule will become active
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |