org.media.mn8.util
Class Cron
java.lang.Object
|
+--org.media.mn8.util.Cron
- public class Cron
- extends java.lang.Object
This is the holder triggers based on standard crontabs format.
- Author:
- Antal Attila
Constructor Summary |
Cron(int minute,
int hour,
int day,
int month,
int year,
boolean isDayOfWeek)
Constructor for Cron. |
Method Summary |
long |
getTimeAfter(long time)
Retrieve the next time at which this trigger activates. |
void |
reset()
Reset the cron-trigger. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
m_minute
protected final int m_minute
m_hour
protected final int m_hour
m_dayOfMonth
protected final int m_dayOfMonth
m_month
protected final int m_month
m_dayOfWeek
protected final int m_dayOfWeek
m_year
protected final int m_year
Cron
public Cron(int minute,
int hour,
int day,
int month,
int year,
boolean isDayOfWeek)
- Constructor for Cron.
Day is either day of week or day of month depending on value of isDayOfWeek.
if (isDayOfWeek == true) then valid values are 1-7 otherwise the values
are 1-31
- Parameters:
minute
- the minute at which job is scheduled. (0-59)hour
- hour at which job is scheduled. (0-23 or -1 for every hour)month
- the month at which job is scheduled. (0-11 or -1 for every month)year
- the year when job is scheduled (-1 implies every year)day
- the dayisDayOfWeek
- true if day is a day of week or false if day is day of month
getTimeAfter
public long getTimeAfter(long time)
- Retrieve the next time at which this trigger activates.
- Returns:
- the time at which the trigger will activate
reset
public void reset()
- Reset the cron-trigger.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
"Copyright © 2001 Internet Multicasting Services & media.org. All Rights Reserved."