Announcement Announcement Module
Collapse
No announcement yet.
getPreviousFireTime() question quartz schedular Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getPreviousFireTime() question quartz schedular

    Hi,

    My quartz shceduler class extends CronTriggerBean. In the class, I invoke the method getPreviousFireTime() (which is define in the CronTrigger). Instead of getting the previous fire time I am getting the current fire time. I am getting the correct value for the nextFireTime. can anybody help me.

    Thanks in advance
    Ranjan

  • #2
    Me too

    I too am experiencing this very same behavior. In my case, however, I am not using spring at all. I am using straight quartz started from a java main. here is my code:
    Code:
    Date startDate = context.getTrigger().getPreviousFireTime(); 
    Date endDate = context.getFireTime();
    			
    	log("startDate=${DATE_PARAM_SDF.format(startDate)} ");
    	log("endDate=${DATE_PARAM_SDF.format(endDate)}");
    Here is the log output
    Code:
    [DEBUG] (StandardJob.java:253 - 2012-03-14 15:30:05.777) - startDate=2012-03-14 15:30:00  
    [DEBUG] (StandardJob.java:253 - 2012-03-14 15:30:05.784) - endDate=2012-03-14 15:30:00
    So have you solved this? What version of quartz are you using?
    I am using 1.8.4.

    Comment

    Working...
    X