- Job implementation
class MyJob extends Job {
// require method here
}
- Register in DI mechanism
object ApplicationModule extends AbstractModule with JobSyntax {
override def configure(): Unit = {
install(job[MyJob].named("my-awsome-job")
}
}
- Enable for scheduling
jobs.enabled += "my-awsome-job"
Old GlobalSettings
would use injected JobManager
as addiction to legacy mechanic.
This would allow teams move smothly from old implementation to new implementation, and support both solution for some time.
- Should we expose configuration of scheduling interval into configuration
- Hooks for auditing
- Metrics over execution
- Dynamicly created scheduled jobs
- Usage of Guice - maybe multibindings is what we need here
- What if job execution exceed scheduling interval
- Non fixed scheduling - job could have control over deplays he wants