ScheduledTask

inner class ScheduledTask(originalRunCondition: Condition)

A task that will run when a condition is met.

Constructors

Link copied to clipboard
constructor(originalRunCondition: Condition)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
infix fun after(interval: Measure<Time>): Scheduler.ScheduledTask

Run a task assigned to in run() in a certain amount of time of the condition remaining true. This will delay the activation of the task by the specified amount of time of the condition remaining true. If this method is called multiple times, the last time directive will be used.

Link copied to clipboard

Chain an AND condition to the current conditional task. Will be evaluated after the controller condition, and before the OR conditions.

Link copied to clipboard

Run the task assigned to in run() until this condition is met. Once this condition is met, the task will be forcefully stopped and the scheduler will move on. This is useful for continuous tasks. If this method is called multiple times, an OR condition will be composed with the last condition.

Link copied to clipboard
infix fun in(interval: Measure<Time>): Scheduler.ScheduledTask

Run a task assigned to in run() in a certain amount of time of the condition remaining true. This will delay the activation of the task by the specified amount of time of the condition remaining true. If this method is called multiple times, the last time directive will be used.

Link copied to clipboard

Mute this task from being a part of the Scheduler report.

Link copied to clipboard

Chain an OR condition to the current conditional task. Will be evaluated after the controller and AND conditions.

Link copied to clipboard
infix fun run(task: Task): Scheduler.ScheduledTask

Queue a task when the condition is met. This task will run (and self-reset if finished) for as long as the condition is met.

infix fun run(runnable: Runnable): Scheduler.ScheduledTask

Implicitly make a new RunTask to run as the condition is met. This callback will requeue as many times as the trigger is met.

Link copied to clipboard

Queue a task when the condition is met, debouncing the task from queueing more than once the condition is met.

Implicitly make a new RunTask to run once the condition is met, debouncing the task from queueing more than once the condition is met.

Link copied to clipboard
open override fun toString(): String