@Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface Scheduled
Define a Quartz Trigger. There you can put expressions
like: 5s, 15minutes, 2hours, etc... or a CRON expression:
0/3 * * * * ?.
It is also possible to put the name of property:
public class MyJob {
@Scheduled("job.expr")
public void doWork() {
...
}
}
And again the property: job.expr must be one of the previously described
expressions.
SimpleTrigger that repeat for ever or
CronTrigger.| Modifier and Type | Required Element and Description |
|---|---|
String |
value
Expression can be one of these three options:
Interval: 10s, 10secs, 10minutes, 1h, etc...
Cron expression: 0/3 * * * * ?
Reference to a property, where the property value is one of the two previous options
|
public abstract String value
Config.getDuration(String, java.util.concurrent.TimeUnit)Copyright © 2015. All rights reserved.