All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.nemerosa.ontrack.job.JobRegistration.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
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