1

Simple question, I think.

I have org.springframework.scheduling.quartz.CronTriggerBean triggering one job once a day. Because this method can last a long time (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.

erickson
  • 265,237
  • 58
  • 395
  • 493
Trick
  • 3,779
  • 12
  • 49
  • 76
  • Duplicate : http://stackoverflow.com/questions/1636556/ensure-that-spring-quartz-job-execution-doesnt-overlap – skaffman Mar 31 '10 at 13:26
  • But a different answer. But yes - now I see, that down under is not-accepted answer the same as here. – Trick Mar 31 '10 at 14:09

1 Answers1

0

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

Bipul
  • 1,327
  • 4
  • 16
  • 33