Results 1 to 3 of 3

Thread: CronTrigger endTime can not be specified through CronTriggerFactoryBean

  1. #1
    Join Date
    Jul 2007
    Posts
    6

    Default CronTrigger endTime can not be specified through CronTriggerFactoryBean

    Hi All,

    There has been a requirement on my project to specify endTime for crontrigger. I'm using spring 3.1 and Quartz 2.0.2.
    Although Quartz's native class CrontriggerImpl supports endTime property( which specify what is the last time the trigger should fire). But Spring's CronTriggerFactoryBean does not have any method though which I can specify the end time for a particular trigger. Could anybody suggest if there is any way, by which I can set it?

  2. #2
    Join Date
    Mar 2007
    Posts
    515

    Default

    I believe you can use the same (not so elegant) workaround I suggested here.

  3. #3
    Join Date
    Jul 2007
    Posts
    6

    Default

    Hi Andrei,

    Thanks for your reply. But It is quite difficult to write one generic method to calculate repeat interval for cron trigger.
    For one time job if I set the job durability as false and when the associated trigger finished its job, the job and trigger automatically get deleted from quartz database.(I'm using DataBase JOB store).

    But problem starts with cron trigger.I have though of one manual workaround(dirty though). I am scheduling one job which would run on that end time. And that job would actually delete rows from respective database tables corresponding to the actual job and trigger.

    Actually in my project, user give input about the end time of a trigger. So, If I can set the end Time property of cron trigger through spring,my job is done.

    I have saw your post and the jira issue you raised for repeatInterval. It would be nice to have endTime property on crontriggerfactorybean.I do not know how to raise a jira issue. If you please can raise it it would be great for other developers too who would like to use this feature.

Tags for this Thread

Posting Permissions

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