run
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.
Note this means that the task provided will run from start-to-finish when the condition is true, which means it won't execute exclusively while the condition is met, rather have the capability to be started when the condition is met. This means continuous iterations of a true condition will try to keep this task queued at all times, resetting the task internally when it is completed. Keep this in mind if working with looping/long tasks, as you might experience runaway tasks. See finishIf for fine-grain "run exclusively if" control.
This method can only be called once per ScheduledTask. If you do not mention timing control, this task will be run immediately when the condition is met, ending when the task ends.
Return
Current builder for additional task parameters
Parameters
The task to run.
Implicitly make a new RunTask to run as the condition is met. This callback will requeue as many times as the trigger is met.
This method can only be called once per ScheduledTask, see a TaskGroup for multiple task execution. If you do not mention timing control, this task will be run immediately when the condition is met, ending immediately as it is an RunTask.
Return
Current builder for additional task parameters
Parameters
The code to run
Implicitly make a new RunTask to run as the condition is met. This callback will requeue as many times as the trigger is met.
This method can only be called once per ScheduledTask, see a TaskGroup for multiple task execution. If you do not mention timing control, this task will be run immediately when the condition is met, ending immediately as it is an RunTask.
Return
Current builder for additional task parameters
Parameters
task name
The code to run