Class JobCron
java.lang.Object
com.netscape.cmscore.jobs.JobCron
class representing one Job cron information
here, an "item" refers to one of the 5 fields in a cron string; "element" refers to any comma-deliminated element in an "item"...which includes both numbers and '-' separated ranges. A cron string in the configuration takes the following format: minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), day of the week (0-6 with 0=Sunday)
e.g. jobsScheduler.job.rnJob1.cron=30 11,23 * * 1-5 In this example, the job "rnJob1" will be executed from Monday through Friday, at 11:30am and 11:30pm.
- Version:
- $Revision$, $Date$
- Author:
- cfu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringCRON_MINUTE, CRON_HOUR, CRON_DAY_OF_MONTH, CRON_MONTH_OF_YEAR, and CRON_DAY_OF_WEEK are to be used in getItem() to retrieve the corresponding CronItemstatic final Stringstatic org.slf4j.Loggerstatic final Stringconstant that represents the configuration parameter "cron" for the job that this JobCron is associated with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintDOW_cal2cron(Calendar time) convert the day of the week representation from Calendar to cronretrieves the cron itemintMOY_cal2cron(Calendar time) convert the month of year representation from Calendar to cron
-
Field Details
-
logger
public static org.slf4j.Logger logger -
PROP_CRON
constant that represents the configuration parameter "cron" for the job that this JobCron is associated with. The value of which should conform to the cron format specified above.- See Also:
-
CRON_MINUTE
CRON_MINUTE, CRON_HOUR, CRON_DAY_OF_MONTH, CRON_MONTH_OF_YEAR, and CRON_DAY_OF_WEEK are to be used in getItem() to retrieve the corresponding CronItem- See Also:
-
CRON_HOUR
- See Also:
-
CRON_DAY_OF_MONTH
- See Also:
-
CRON_MONTH_OF_YEAR
- See Also:
-
CRON_DAY_OF_WEEK
- See Also:
-
-
Constructor Details
-
JobCron
- Throws:
EBaseException
-
-
Method Details
-
getItem
-
DOW_cal2cron
convert the day of the week representation from Calendar to cron- Parameters:
time- the Calendar value represents a moment of time- Returns:
- an integer value that represents a cron Day-Of-Week element
-
MOY_cal2cron
convert the month of year representation from Calendar to cron- Parameters:
time- the Calendar value represents a moment of time- Returns:
- an integer value that represents a cron Month-Of-Year element
-