Skip to content

Small clarification to CronTrigger javadoc [SPR-10556] #15186

Closed
@spring-projects-issues

Description

@spring-projects-issues

Archie Cobbs opened SPR-10556 and commented

It wasn't clear to me that a CronTrigger would never schedule overlapping executions.

This additional javadoc may help clarify this for others:

--- CronTrigger.java.orig	2013-05-13 11:11:16.000000000 -0500
+++ CronTrigger.java	2013-05-13 11:12:10.000000000 -0500
@@ -55,6 +55,12 @@
 	}
 
 
+	/**
+	 * Determine the next execution time according to the given trigger context.
+	 * Next execution times are calculated based on the
+	 * {@linkplain TriggerContext#lastCompletionTime completion time} of the
+	 * previous execution; therefore, overlapping executions won't occur.
+	 */
 	public Date nextExecutionTime(TriggerContext triggerContext) {
 		Date date = triggerContext.lastCompletionTime();
 		if (date != null) {

Affects: 3.2.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions