Skip to content
Steve Cote edited this page Sep 10, 2015 · 1 revision

A Scheduler is a component which runs tasks repeatedly, pausing a specified amount of time between each run.

This component uses its own ThreadPool instance to run tasks so it is possible for multiple tasks to be running at once.

The Scheduler is itself a ThreadJob to it can be run in a ThreadPool. As a ThreadJob, all its work is performed in the doWork() method.

The sum of processing performed in each iteration through the doWork() method involves checking the execution time of the next job and if it is due to be run, placing it in the ThreadPool for execution. The job is then removed from the queue. If the removed job isRepeatable() it is then rescheduled for later execution unless it has reached its execution limit.

Scheduled Job

The ScheduledJob is a specialization of ThreadJob and is therefore designed to run in a ThreadPool. The difference between a ScheduledJob and a ThreadJob is it contains a few more attributes which specifies re-occurrence and time spent in execution.

Clone this wiki locally