How to maintain a job history using Quartz scheduler

后端 未结 3 640
暗喜
暗喜 2021-02-02 02:46

I\'d like to maintain a history of jobs that were scheduled by a Quartz scheduler containing the following properties: \'start time\', \'end time\', \'success\', \'error\'.

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-02 03:19

    The scheduler has to maintain a key that lets it correlate each history entry. There must be a unique job ID of some kind that's created when a job kicks off to be able to accomplish this.

    You don't mention such a thing, so I thought it was worth a suggestion.

    UPDATE: I'd INSERT a record into the database when a job is created and get back the primary key (maybe a GUID). I'd use that as the key.

提交回复
热议问题