开发者

Quartz Cron Trigger with Spring - triggering new cron before last ended

Simple question, I think.

I have org.springframework.scheduling.quartz.CronTriggerBean triggering one job once a day. Because this method can last a long ti开发者_JAVA技巧me (over 24 hours), will the next day at the same time a new job be executed if the last one is not ended yet?

If yes - is it possible to turn off executing new jobs until the last one is finished?

My method is trans-coding videos and some days there a lot of videos and could last long.


Make the Job stateful, So it will prevent the new instance before the previous instance of the job ended.

You 'mark' a Job as stateful by having it implement the StatefulJob interface. You will get more about stateful job here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜