public interface Task
Task classes could be scheduled:
By adding a Scheduled annotation
@Scheduled("0/2 * * * * ?")
Or programmatically with a ScheduledTaskBuilder
@Inject
private ScheduledTaskBuilderFactory factory;
...
factory.createSchedulerBuilder(MyTask.class).withCronExpression("0/2 * * * * ?").schedule();
| Modifier and Type | Method and Description |
|---|---|
void |
execute(SchedulingContext sc)
This method is called by the scheduler when the task is executed.
|
void execute(SchedulingContext sc) throws Exception
sc - the associated scheduling contextException - if something goes wrong during task execution.Copyright © 2013-2018–2019 SeedStack. All rights reserved.