Package-level declarations

Types

Link copied to clipboard
interface Job

Kronos Job For Scheduling tasks

Link copied to clipboard
data class KronoJob(val id: String = UUID.randomUUID().toString(), val jobName: String, val params: Map<String, String>, val startTime: Long, val endTime: Long? = null, val interval: <Error class: unknown class>? = null, val periodic: Periodic? = null, val maxCycles: Int? = null, val retries: Int = 0, val createdAt: Long = Clock.System.now().toEpochMilliseconds(), val originCreatedAt: <Error class: unknown class> = Clock.System.now().toLocalDateTime(TimeZone.UTC), val locks: Int = 0, val overshotAction: OvershotAction)
Link copied to clipboard
object Kronos
Link copied to clipboard
interface KronosStore

Storage abstraction used by Kronos. Implement this interface to add a new backend.

Link copied to clipboard

What do you want to happen when the job runner finds that the job start time is in the past. This can happen when the job does no run at the start time because the system is down or was not handled by the job runner

Link copied to clipboard
class Periodic

Not that time is in UTC so adjust for the expected time in your time-zone.

Functions

Link copied to clipboard
suspend fun Kronos.handleJob(kronoJob: KronoJob, currentInstant: <Error class: unknown class> = Clock.System.now())
Link copied to clipboard
suspend fun Kronos.schedule(jobName: String, delay: <Error class: unknown class> = Duration.ZERO, interval: <Error class: unknown class>? = null, endTime: Long? = null, maxCycles: Int? = null, retries: Int? = null, params: Map<String, String>, overshotAction: OvershotAction = OvershotAction.Drop): String?
suspend fun Kronos.schedule(jobName: String, startTime: Long, interval: <Error class: unknown class>? = null, endTime: Long? = null, maxCycles: Int? = null, retries: Int? = null, params: Map<String, String>, overshotAction: OvershotAction = OvershotAction.Drop): String?
Link copied to clipboard
suspend fun Kronos.schedulePeriodic(jobName: String, delay: <Error class: unknown class> = Duration.ZERO, periodic: Periodic, endTime: Long? = null, maxCycles: Int? = null, retries: Int? = null, params: Map<String, String>, overshotAction: OvershotAction = OvershotAction.Drop): String?
suspend fun Kronos.schedulePeriodic(jobName: String, startTime: Long, periodic: Periodic, endTime: Long? = null, maxCycles: Int? = null, retries: Int? = null, params: Map<String, String>, overshotAction: OvershotAction = OvershotAction.Drop): String?