net.nemerosa.ontrack.job.JobRegistration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-job Show documentation
Show all versions of ontrack-job Show documentation
Abstract management of identified jobs.
package net.nemerosa.ontrack.job
/**
* Association of a job and a schedule for a registration at startup.
*/
data class JobRegistration(
val job: Job,
val schedule: Schedule
) {
fun withSchedule(schedule: Schedule) = JobRegistration(job, schedule)
fun everyMinutes(minutes: Long): JobRegistration {
return withSchedule(Schedule.everyMinutes(minutes))
}
companion object {
@JvmStatic
fun of(job: Job): JobRegistration {
return JobRegistration(job, Schedule.NONE)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy