schedule

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?

Parameters

jobName

The unique name of a job that has already been registered

interval

The time between jobs. Specify a value to make the job repeated. If the period is null then the job will be treated asa one time Job It is advised to use a minimum of 1 minute, so you don't choke your resources

delay

if delay is not specified or is set to zero, The job will run at the next minute

endTime

The job wil not be repeated if it is after this time

maxCycles

The job wil not be repeated after this number of cycles

retries

The number of retries if the job execution fails. Falls back to the Job.retries of the Job if not specified

params

The data that will be made available to your job during execution. Note that 'cycleNumber' is a reserved name and should not be included

overshotAction

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


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?

Parameters

jobName

The unique name of a job that has already been registered

interval

The time between jobs. Specify a value to make the job repeated. This will be set to 1 minute if it is null and maxCycles !=null If the period is null then the job will be treated asa one time Job It is advised to use a minimum of 1 minute which is the highest precision, so you don't choke your resources

startTime
endTime

The job wil not be repeated if it is after this time

maxCycles

The job wil not be repeated after this number of cycles.

retries

The number of retries if the job execution fails. Falls back to the Job.retries of the Job if not specified

params

the data that will be made available to your job during execution

overshotAction

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