Execution will end once the scheduler shuts down or the returned {@link ScheduledFuture} gets cancelled.
@param task the Runnable to execute whenever the trigger fires
@param trigger an implementation of the {@link Trigger} interface,e.g. a {@link org.springframework.scheduling.support.CronTrigger} objectwrapping a cron expression
@return a {@link ScheduledFuture} representing pending completion of the task,or null
if the given Trigger object never fires (i.e. returns null
from {@link Trigger#nextExecutionTime})
@throws org.springframework.core.task.TaskRejectedException if the given task was not acceptedfor internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
@see org.springframework.scheduling.support.CronTrigger
|
|