Add multiple triggers to single quartz job

前端 未结 3 1480
无人及你
无人及你 2021-02-05 16:06

I want to dynamically add triggers to a job, but can\'t find any helpful methods off of Scheduler

I though i would just be able to call the scheduleJob method an repetit

3条回答
  •  暖寄归人
    2021-02-05 16:55

    This post gives a hint, but the conclusion ( schedulerInstance.add(trigger) ) is not valid as of Quartz 2.01.

    Instead use the following, after assinging the job to the trigger ( one way is using the TriggerBuilder's forJob method )

     schedulerInstance.scheduleJob( newTrigger )
    

提交回复
热议问题