-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
Description
Description
I've been using the Quarkus Scheduler a lot to programmatically schedule and pause jobs. I've been toying around with building a runtime configuration provider, something similar to LaunchDarkly/Unleash. It's kind of a pet project and taking a lot of time, but one thing I was hoping to do is run all config pushes through the Quarkus scheduler.
When scheduling jobs via the imperative interface, one thing that would be nice is the ability to fire a job immediately upon registration of the trigger.
Implementation ideas
I'm not sure if there's a simple way to implement this but the desired interface, I imagine, would look something like this:
scheduler.newJob("myJobId")
.setInterval(Duration.ofSeconds(60))
.setAsyncTask(executionContext -> myTask())
.setFirstRunImmediate(true)
.schedule();
If anyone has an idea on a decent way to implement this I'd be happy to offer a PR.