public class CronJob extends SchedulerJob implements MutableSchedulerJob
| Modifier and Type | Class and Description |
|---|---|
static class |
CronJob.Definition |
SchedulerJob.MyTaskContextCALCULATE_NEXT, context, DISABLED_TIME, log, REMOVE_TIME| Constructor and Description |
|---|
CronJob(String name,
CronJob.Definition definition,
boolean restrictive,
Observer task)
Constructor for CronJob.
|
CronJob(String definition,
Observer task)
Constructor for CronJob.
|
CronJob(String name,
String definition,
boolean restrictive,
Observer task)
Constructor for CronJob.
|
CronJob(String name,
String definition,
Observer task)
Constructor for CronJob.
|
CronJob(String minute,
String hour,
String dayOfMonth,
String month,
String dayOfWeek,
Observer task)
Constructor for CronJob.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doCaclulateNextExecution()
Calculate the next executionTime and store it into nextExecutionTime
|
boolean |
doReconfigure(String config)
Reconfigure the scheduler.
|
void |
doReschedule(Scheduler queue,
long time)
doReschedule.
|
protected boolean |
isExecutionTimeReached()
By default the function will compare the nextExecutionTime with the current time.
|
boolean |
isRestrictive()
isRestrictive.
|
void |
setDone(boolean done)
Setter for the field
done. |
void |
setRestrictive(boolean restrictive)
Setter for the field
restrictive. |
void |
setScheduledTime(long scheduledTime)
Setter for the field
scheduledTime. |
String |
toString() |
canExecute, doError, doExecute, doExecute2, doit, doSchedule, doTick, doTimeoutReached, getDescription, getLastExecutionStart, getLastExecutionStop, getNextExecutionTime, getOwner, getScheduledTime, getTask, getThread, getTimeoutInMinutes, hasAccess, isBusy, isDone, releaseBusy, setBusy, setNextExecutionTime, setTask, setTimeoutInMinutescancel, getName, isCanceled, onError, onFinal, run, setCanceled, setName, updatescheduledExecutionTimepublic CronJob(String name, CronJob.Definition definition, boolean restrictive, Observer task)
Constructor for CronJob.
name - a String object.definition - a CronJob.Definition object.restrictive - a boolean.task - a Observer object.public CronJob(String minute, String hour, String dayOfMonth, String month, String dayOfWeek, Observer task)
Constructor for CronJob.
public void doCaclulateNextExecution()
doCaclulateNextExecution in class SchedulerJobprotected boolean isExecutionTimeReached()
isExecutionTimeReached in class SchedulerJobpublic boolean isRestrictive()
isRestrictive.
public void setRestrictive(boolean restrictive)
Setter for the field restrictive.
restrictive - a boolean.public String toString()
toString in class SchedulerJobpublic void doReschedule(Scheduler queue, long time)
doReschedule.
doReschedule in interface MutableSchedulerJobdoReschedule in class SchedulerJobqueue - a Scheduler object.time - a long.public void setDone(boolean done)
Setter for the field done.
setDone in interface MutableSchedulerJobsetDone in class SchedulerJobdone - a boolean.public boolean doReconfigure(String config)
doReconfigure in interface MutableSchedulerJobconfig - a String object.public void setScheduledTime(long scheduledTime)
Setter for the field scheduledTime.
setScheduledTime in interface MutableSchedulerJobsetScheduledTime in class SchedulerJobscheduledTime - a long.Copyright © 2016. All Rights Reserved.