Skip to content

CronTrigger is not triggered at correct time [SPR-7004] #11669

Closed
@spring-projects-issues

Description

@spring-projects-issues

adi ofry opened SPR-7004 and commented

When running CronTrigger on short interval I get the task triggered sooner then requested and also get duplicates.

public void initScheduler() {
System.out.println("Got initScheduler");
taskExecutor = new ThreadPoolTaskScheduler();
taskExecutor.initialize();

taskExecutor.schedule(new Runnable() {
          @Override
     public void run() {
                                                                                                                                                                  System.out.println(new Date());				
     }
},new CronTrigger("0/5 * * * * ?"));

}

The output is:
Got initScheduler
Thu Mar 18 17:08:19 IST 2010
Thu Mar 18 17:08:24 IST 2010
Thu Mar 18 17:08:24 IST 2010
Thu Mar 18 17:08:25 IST 2010
Thu Mar 18 17:08:29 IST 2010
Thu Mar 18 17:08:30 IST 2010


Affects: 3.0.1

Attachments:

Issue Links:

Referenced from: commits dea5918

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions