public interface Scheduler extends Lifecycle, NameableObject
An scheduler is a class that arrange jobs in a define schedule. Once the Scheduler starts it launch a thread that
triggers an action, when stopped, that action is not executed anymore, unless it is scheduled on demand by
The initialization of a Scheduler is thought to be the stage where it reserves resources to schedule. While the dispose phase is thought to be the stage where those resources are released.
The recommended way to create a Scheduler is by a
SchedulerFactory, this will allow other users to hook the
Scheduler creation. This can me omitted if this is not desired.
Each scheduler is thought to schedule a single job. Check the
SchedulerFactory#create(String, Object) to see the
creation of the scheduler for more details.
|Modifier and Type||Method and Description|
Launches the action asynchronously.
void schedule() throws Exception
Launches the action asynchronously. The time can or can't be immediate depending on the Scheduler implementation.
By default, schedulers users can use a scheduler not matter if it is started or stopped. By default the Scheduler implementation should schedule a job regardless of it lifecycle state. If this is not accepted then check Scheduler state and throw exception.
Exception- If the job could not be scheduled.
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.