public class CronEvent extends ScheduleEvent
Scheduler
.
The recurring occurrence time is described in a cron like syntax, that is :
Scheduler
,
ScheduleEvent
,
Serialized FormModifier and Type | Field and Description |
---|---|
private static int |
CRON_DOM
days of month
|
private static int |
CRON_DOW
days of week
|
private static int |
CRON_H
hours of day
|
private static int |
CRON_MAX
max value (+1) for
CRON_* constants |
private static int |
CRON_MN
minutes of hour
|
private static int |
CRON_MOY
months of year
|
private static int[] |
max
maximum for values designed by
CRON_* constants |
private static int[] |
min
minimum for values designed by
CRON_* constants |
private BitSet[] |
ranges
cron dates for this event
|
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
private static String[] |
values
string image for
CRON_* constants, by index in the table |
date, name, outdatedRestart
Constructor and Description |
---|
CronEvent(String name,
String date)
Creates an item.
|
Modifier and Type | Method and Description |
---|---|
protected Date |
nextDate(Date now)
Returns the next scheduling date after current date given as parameter.
|
StringBuffer |
toString(StringBuffer output)
Provides a string image for this object.
|
toString
private static final long serialVersionUID
private static final int CRON_MN
private static final int CRON_H
private static final int CRON_DOM
private static final int CRON_MOY
private static final int CRON_DOW
private static final int CRON_MAX
CRON_*
constantsprivate static final String[] values
CRON_*
constants, by index in the tableprivate static final int[] min
CRON_*
constantsprivate static final int[] max
CRON_*
constantsprivate BitSet[] ranges
public CronEvent(String name, String date) throws IllegalArgumentException
name
- event namedate
- event scheduling date as a cron like stringIllegalArgumentException
- when date is misformedpublic StringBuffer toString(StringBuffer output)
toString
in class ScheduleEvent
protected Date nextDate(Date now)
null
date leads to the scheduler deleting the event.nextDate
in class ScheduleEvent
now
- current dateCopyright © 2015 ScalAgent D.T.. All Rights Reserved.