finishIf

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.

Return

Current builder for additional task parameters

Parameters

condition

The condition to stop the task. Note the task will be auto-stopped if it finishes by itself, this condition simply allows for an early finish if this condition is met.