public interface CronJob
One task that is performed on a routine basis.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The various executors that may be selected to run this job.static enum
The set of possible concurrency settings for cron jobs. -
Method Summary
Modifier and TypeMethodDescriptiondefault CronJob.Executor
Gets the executor that should be used for this job.default String
getName()
Gets the name for this cron job.Gets the schedule for this cron job.default CronJob.ScheduleMode
Gets the job scheduling mode.default int
Gets the Thread priority for this job.void
run
(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year) Performs the scheduled task.
-
Method Details
-
getName
Gets the name for this cron job.Defaults to
getClass().
.getName()
-
getSchedule
Schedule getSchedule()Gets the schedule for this cron job. This is called once per minute for each job. -
getScheduleMode
Gets the job scheduling mode.Defaults to
CronJob.ScheduleMode.SKIP
.- See Also:
-
getExecutor
Gets the executor that should be used for this job.Defaults to
CronJob.Executor.UNBOUNDED
. -
getThreadPriority
default int getThreadPriority()Gets the Thread priority for this job.Defaults to
Thread.NORM_PRIORITY
.- See Also:
-
run
void run(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year) Performs the scheduled task.- See Also:
-