enragedginger / akka-quartz-scheduler

Quartz Extension and utilities for cron-style scheduling in Akka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cancel/Delete all job schedules

amdelamar opened this issue · comments

Can we get a function added to cancel/remove all job schedules? There are a few functions I see that don't quite do this yet:

  • deleteJobSchedule(name: String) -> Requires knowning the schedule name.
  • suspendAll() -> Pauses but doesn't remove job schedules.
  • shutdown(waitForJobsToComplete: Boolean = false) -> Looks like what I want but comment says "The scheduler cannot be re-started." so I'm not sure if I can reuse the scheduler or not.

It'd be great addition to have a cancelAll() function.

I'd be happy to make a PR, if that helps.

@amdelamar Feel free to create a PR with some tests and I'll take a look at it!

I'd be happy to make a PR, if that helps.

It will, waiting for it. 😁

I got the 'Ok' from my workplace, so I put up a PR.
I decided it should be deleteAll() since cancelAll() is akin to suspendAll() and that's implemented already.