|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.torque.om.BaseObject | +--org.apache.turbine.services.schedule.JobEntry
This is a wrapper for a scheduled job. It is modeled after the Unix scheduler cron.
Fields inherited from class org.apache.torque.om.BaseObject |
NEW_ID |
Constructor Summary | |
JobEntry()
Default Constructor |
|
JobEntry(int sec,
int min,
int hour,
int wd,
int day_mo,
java.lang.String task)
Constuctor. |
Method Summary | |
void |
calcRunTime()
Calculate how long before the next runtime. The runtime determines it's position in the job queue. |
int |
compareTo(java.lang.Object je)
Used for ordering Jobentries Note: this comparator imposes orderings that are inconsistent with equals. |
boolean |
equals(java.lang.Object je)
Compare this Job with another. |
int |
getDay_of_month()
Get the value of day_of_month. |
java.lang.String |
getEmail()
Return the e-mail address for notification. |
int |
getHour()
Get the value of hour. |
int |
getMinute()
Get the value of minute. |
java.lang.String |
getNextRunAsString()
Get the next runtime for this job as a String. |
long |
getNextRuntime()
Get the next runtime for this job as a long. |
java.util.Hashtable |
getProperty()
Get extra job properties |
int |
getSecond()
Get the value of second. |
java.lang.String |
getTask()
Return the task for this job. |
int |
getWeekday()
Get the value of weekday. |
boolean |
isActive()
Check to see if job is currently active/running |
void |
save()
Self-preservation. |
void |
save(java.sql.Connection conn)
not implemented |
void |
save(java.lang.String dbname)
not implemented |
void |
setActive(boolean isActive)
Sets whether the job is running. |
void |
setDay_of_month(int v)
Set the value of day_of_month. |
void |
setEmail(java.lang.String mail)
The address to send mail notifications to. |
void |
setHour(int v)
Set the value of hour. |
void |
setMinute(int v)
Set the value of minute. |
void |
setProperty(java.util.Hashtable prop)
Set job properties |
void |
setSecond(int v)
Set the value of second. |
void |
setTask(java.lang.String task)
Set the task name for this job. |
void |
setWeekday(int v)
Set the value of weekday. |
Methods inherited from class org.apache.torque.om.BaseObject |
equals, getByName, getByPeerName, getByPosition, getCategory, getPrimaryKey, getPrimaryKeyAsBigDecimal, getPrimaryKeyAsInt, getPrimaryKeyAsLong, getPrimaryKeyAsString, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey, setPrimaryKey, setPrimaryKey |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JobEntry()
public JobEntry(int sec, int min, int hour, int wd, int day_mo, java.lang.String task) throws java.lang.Exception
sec
- Value for entry "seconds".min
- Value for entry "minutes".hour
- Value for entry "hours".wd
- Value for entry "week days".day_mo
- Value for entry "month days".task
- Task to execute.Exception,
- a generic exception.Method Detail |
public void calcRunTime() throws java.lang.Exception
Exception,
- a generic exception.public long getNextRuntime()
public java.lang.String getNextRunAsString()
public void setEmail(java.lang.String mail)
mail
- The email address.public java.lang.String getEmail()
public java.lang.String getTask()
public void setTask(java.lang.String task)
task
- A String with the name of the job.public int getSecond()
public void setSecond(int v)
v
- Value to assign to second.public int getMinute()
public void setMinute(int v)
v
- Value to assign to minute.public int getHour()
public void setHour(int v)
v
- Value to assign to hour.public int getWeekday()
public void setWeekday(int v)
v
- Value to assign to weekday.public int getDay_of_month()
public void setDay_of_month(int v)
v
- Value to assign to day_of_month.public void save() throws java.lang.Exception
save
in class org.apache.torque.om.BaseObject
Exception,
- a generic exception.public void save(java.sql.Connection conn) throws java.lang.Exception
save
in class org.apache.torque.om.BaseObject
conn
- java.lang.Exception
- public void save(java.lang.String dbname) throws java.lang.Exception
save
in class org.apache.torque.om.BaseObject
dbname
- java.lang.Exception
- public int compareTo(java.lang.Object je)
compareTo
in interface java.lang.Comparable
je
- The first JobEntry
object.int
indicating the result of the comparison.public boolean equals(java.lang.Object je)
equals
in class org.apache.torque.om.BaseObject
je
- The JobEntry object to compare to.public void setActive(boolean isActive)
isActive
- Whether the job is running.public boolean isActive()
public void setProperty(java.util.Hashtable prop)
public java.util.Hashtable getProperty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |