Results 1 to 2 of 2

Thread: getPreviousFireTime() question quartz schedular

Hybrid View

  1. #1
    Join Date
    May 2008
    Posts
    22

    Default 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. #2
    Join Date
    Jun 2008
    Location
    Jacksonville, Florida
    Posts
    147

    Default 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •