diff --git a/docs/src/main/asciidoc/scheduler-reference.adoc b/docs/src/main/asciidoc/scheduler-reference.adoc index 8255fdcb965cf3..df434c8450bc0e 100644 --- a/docs/src/main/asciidoc/scheduler-reference.adoc +++ b/docs/src/main/asciidoc/scheduler-reference.adoc @@ -265,11 +265,10 @@ void everyTwoSeconds() { } `@Scheduled#executionMaxDelay()` can be set to delay each execution of a scheduled method. The value represents the maximum delay between the activation of the trigger and the execution of the scheduled method. -The actual delay varies randomly over time but it never exceeds the maximum value. +The actual delay is a randomized number between 0 and the maximum specified delay. The value is parsed with `DurationConverter#parseDuration(String)`. -It can be a property expression. -In that case, the scheduler attempts to use the configured value instead: `@Scheduled(executionMaxDelay = "${myJob.maxDelay}")`. +It can be a property expression, in which case, the scheduler attempts to use the configured value instead: `@Scheduled(executionMaxDelay = "${myJob.maxDelay}")`. Additionally, the property expression can specify a default value: `@Scheduled(executionMaxDelay = "${myJob.maxDelay}:500ms}")`. @@ -278,7 +277,7 @@ Additionally, the property expression can specify a default value: @Scheduled(every = "2s", executionMaxDelay = "500ms") <1> void everyTwoSeconds() { } ---- -<1> The delay will be a value between 0 and 500 milliseconds. As a result, the period between to `everyTwoSeconds()` executions will be roughly between two and two and a half seconds. +<1> The delay will be a value between 0 and 500 milliseconds. As a result, the period between to `everyTwoSeconds()` executions will be roughly between one and a half and two and a half seconds. [[concurrent_execution]] === Concurrent Execution