From 85597f29f2a2192bc5e7e0a230ffd523a3e84736 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Tue, 9 Apr 2019 19:03:30 +0200 Subject: [PATCH] Improve @Scheduled Javadoc regarding cron element order Closes gh-22777 --- .../scheduling/annotation/Scheduled.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java index b969cec5724..13347e5ae1b 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java @@ -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. *

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: + *

*

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