enragedginger/akka-quartz-scheduler

Can't restart a job put on standby

zoltanmaric opened this issue · 3 comments

After suspending the scheduler, it can no longer be resumed.

val scheduler = PatchedQuartzSchedulerExtension(system)
scheduler.standby()
scheduler.start() // this line logs a warning saying it's already started

This is because the start method only checks the value of the isStarted field, but not the isInStandbyMode field.

Proposed patch:

  def start(): Boolean =
    if(isStarted && !isInStandbyMode) {
      log.warning("Cannot start scheduler, already started.")
      false
    } else {
      scheduler.start()
      true
    }

I can submit a pull request with the proposed patch later.

This sounds reasonable to me. Does anyone else have any comments on this?

@zoltanmaric If you submit a pull request, I'll review it.

Thanks!

Marking as closed due to inactivity.