Browse Source

Improve @Scheduled Javadoc regarding cron element order

Closes gh-22777
pull/22781/head
P. Ottlinger 7 years ago committed by Sam Brannen
parent
commit
85597f29f2
  1. 12
      spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java

12
spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java

@ -66,9 +66,17 @@ public @interface Scheduled { @@ -66,9 +66,17 @@ public @interface Scheduled {
/**
* A cron-like expression, extending the usual UN*X definition to include triggers
* on the second as well as minute, hour, day of month, month and day of week.
* on the second, minute, hour, day of month, month and day of week.
* <p>E.g. {@code "0 * * * * MON-FRI"} means once per minute on weekdays
* (at the top of the minute - the 0th second).
* (at the top of the minute - the 0th second). The order read from left to right is:
* <ul>
* <li>second</li>
* <li>minute</li>
* <li>hour</li>
* <li>day of month</li>
* <li>month</li>
* <li>day of week</li>
* </ul>
* <p>The special value {@link #CRON_DISABLED "-"} indicates a disabled cron trigger,
* primarily meant for externally specified values resolved by a ${...} placeholder.
* @return an expression that can be parsed to a cron schedule

Loading…
Cancel
Save