@Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface Scheduled
Define a Quartz Trigger. Using one of three expressions:
5s;delay=60s;repeat=*, delay and repeat
are optional
0/3 * * * * ?.conf file which has one of two previous
formatsRun every 5 minutes, start immediately and repeat for ever:
@Scheduled("5m")
@Scheduled("5m; delay=0")
@Scheduled("5m; delay=0; repeat=*")
Previous, expressions are identical.
Run every 1 hour with an initial delay of 15 minutes for 10 times
@Scheduled("1h; delay=15m; repeat=10")
Fire at 12pm (noon) every day
0 0 12 * * ?
Fire at 10:15am every day
0 15 10 ? * *
| 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 © 2016. All rights reserved.