Package ninja.scheduler
Annotation Type Schedule
-
@Target(METHOD) @Retention(RUNTIME) public @interface Schedule
Schedules the annotated method for execution
-
-
Field Summary
Fields Modifier and Type Fields Description static String
NO_PROPERTY
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
cron
A CRON-like expression containing the second, minute, hour, day of month, month, and day of week.String
cronZone
A time zone for which the CRON expression will be resolved.long
delay
The delay between executions.String
delayProperty
The property to read the delay from.long
initialDelay
The delay before it should first be run.String
initialDelayProperty
The property to read the initial delay from.TimeUnit
timeUnit
The time unit, defaults to millisecondsString
timeUnitProperty
The property to read the time unit from.
-
-
-
Field Detail
-
NO_PROPERTY
static final String NO_PROPERTY
-
-
-
delayProperty
String delayProperty
The property to read the delay from. If not specified, delay is used.- Returns:
- The name of the property to read the delay from.
- Default:
- "_no-property"
-
-
-
timeUnit
TimeUnit timeUnit
The time unit, defaults to milliseconds- Returns:
- The time unit
- Default:
- java.util.concurrent.TimeUnit.MILLISECONDS
-
-
-
timeUnitProperty
String timeUnitProperty
The property to read the time unit from. If not specified, timeUnit is used.- Returns:
- The property to read the time unit from.
- Default:
- "_no-property"
-
-
-
initialDelayProperty
String initialDelayProperty
The property to read the initial delay from. If not specified, initialDelay is used.- Returns:
- The property to read the initial delay from.
- Default:
- "_no-property"
-
-
-
cron
String cron
A CRON-like expression containing the second, minute, hour, day of month, month, and day of week.- Returns:
- The CRON expression
- Default:
- "_no-property"
-
-
-
cronZone
String cronZone
A time zone for which the CRON expression will be resolved. If not specified, the server's local time zone will be used.- Returns:
- A zone id accepted by
TimeZone.getTimeZone(String)
- Default:
- "_no-property"
-
-