public class Timer
extends java.lang.Object
A possible parameter string is:
0,30 17 * * 1-5
At every day from Monday to Friday (1-5) at 17:00 and 17:30 every week in the year.
59 23 * * 6
At every Saturday in the week at 23:59.
Constructor and Description |
---|
Timer(java.lang.String param)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
long |
nextEvent()
Get the time difference in milli seconds from now to the next event.
|
long |
nextEvent(java.util.Calendar now)
Get the time difference in milli seconds from the given time to the the next event.
|
java.lang.String |
resolve() |
java.lang.String |
toString() |
java.lang.String |
valueToString(int[] arr) |
public Timer(java.lang.String param)
param
- the parameter string.public long nextEvent()
public long nextEvent(java.util.Calendar now)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String resolve()
public java.lang.String valueToString(int[] arr)
public static void main(java.lang.String[] args)