|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.scheduler.CronTab
public final class CronTab
Table for driving scheduled tasks.
Constructor Summary | |
---|---|
CronTab(String format)
|
|
CronTab(String format,
Hash hash)
|
|
CronTab(String format,
int line)
Deprecated. as of 1.448 Use CronTab(String, int, Hash) |
|
CronTab(String format,
int line,
Hash hash)
|
Method Summary | |
---|---|
Calendar |
ceil(Calendar cal)
See ceil(long) . |
Calendar |
ceil(long t)
Computes the nearest future timestamp that matches this cron tab. |
String |
checkSanity()
Checks if this crontab entry looks reasonable, and if not, return an warning message. |
Calendar |
floor(Calendar cal)
See floor(long)
This method modifies the given calendar and returns the same object. |
Calendar |
floor(long t)
Computes the nearest past timestamp that matched this cron tab. |
static String |
hashify(String spec)
Checks a prospective crontab specification to see if it could benefit from balanced hashes. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CronTab(String format) throws antlr.ANTLRException
antlr.ANTLRException
public CronTab(String format, Hash hash) throws antlr.ANTLRException
antlr.ANTLRException
public CronTab(String format, int line) throws antlr.ANTLRException
CronTab(String, int, Hash)
antlr.ANTLRException
public CronTab(String format, int line, Hash hash) throws antlr.ANTLRException
hash
- Used to spread out token like "@daily". Null to preserve the legacy behaviour
of not spreading it out at all.
antlr.ANTLRException
Method Detail |
---|
public Calendar ceil(long t)
More precisely, given the time 't', computes another smallest time x such that:
Note that if t already matches this cron, it's returned as is.
public Calendar ceil(Calendar cal)
ceil(long)
.
This method modifies the given calendar and returns the same object.
public Calendar floor(long t)
More precisely, given the time 't', computes another smallest time x such that:
Note that if t already matches this cron, it's returned as is.
public Calendar floor(Calendar cal)
floor(long)
This method modifies the given calendar and returns the same object.
public String toString()
toString
in class Object
@CheckForNull public String checkSanity()
The point of this method is to catch syntactically correct but semantically suspicious combinations, like "* 0 * * *"
@CheckForNull public static String hashify(String spec)
spec
- a (legal) spec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |