Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue May 13, 2013 · 0 comments
Closed

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

spring-projects-issues opened this issue May 13, 2013 · 0 comments
Assignees
Labels
type: documentation A documentation task type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation task type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants