public final class CronTab extends Object
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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() |
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 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.@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) specCopyright © 2016. All rights reserved.