public class CronTask extends TriggerTask
TriggerTask implementation defining a Runnable to be executed according
to a standard
cron expression.Scheduled.cron(),
ScheduledTaskRegistrar.setCronTasksList(java.util.List),
TaskScheduler| Constructor and Description |
|---|
CronTask(Runnable runnable,
CronTrigger cronTrigger)
Create a new
CronTask. |
CronTask(Runnable runnable,
String expression)
Create a new
CronTask. |
| Modifier and Type | Method and Description |
|---|---|
String |
getExpression() |
getTriggergetRunnablepublic CronTask(Runnable runnable, String expression)
CronTask.runnable - the underlying task to executeexpression - cron expression defining when the task should be executedpublic CronTask(Runnable runnable, CronTrigger cronTrigger)
CronTask.runnable - the underlying task to executecronTrigger - the cron trigger defining when the task should be executedpublic String getExpression()