A cron service, creates events at configurable times. Implemented using the quartz library.
Modifiers | Name | Description |
---|---|---|
static class |
CronService.CronJob |
Internal class, only public because otherwise not called by quartz scheduler. |
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
CRON_NOW |
Pseudo cron string for a single cron event immediately. |
static java.lang.String |
CRON_NOW_AND_STOP |
Pseudo cron string for a single cron event immediately, followed by a single stop event. |
Constructor and description |
---|
CronService
(Jexler jexler, java.lang.String id) Constructor. |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
getCron() Get cron pattern. |
|
Jexler |
getJexler() Get jexler. |
|
org.quartz.Scheduler |
getScheduler() Get quartz scheduler. |
|
CronService |
setCron(java.lang.String cron) Set cron pattern, e.g. "* * * * *" or with seconds "0 * * * * *". |
|
CronService |
setScheduler(org.quartz.Scheduler scheduler) Set quartz scheduler. |
|
void |
start() |
|
void |
stop() |
|
void |
zap() |
Methods inherited from class | Name |
---|---|
class ServiceBase |
getId, getState, setState |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Pseudo cron string for a single cron event immediately.
Pseudo cron string for a single cron event immediately, followed by a single stop event.
Constructor.
jexler
- the jexler to send events toid
- the id of the serviceGet cron pattern.
Get jexler.
Get quartz scheduler.
Set cron pattern, e.g. "* * * * *" or with seconds "0 * * * * *". Use "now" for now, i.e. for a single event immediately, or "now+stop" for a single event immediately, followed by a StopEvent, which can both be useful for testing.
Set quartz scheduler. Default is a scheduler shared by all jexlers in the same jexler container.
Groovy Documentation