isCancelled()

Overview

public boolean function isCancelled()

Returns true if the task has been cancelled or is no longer valid. Call this from your task logic to exit early from the task and cleanup gracefully if required. See also Task manager - ad-hoc tasks (10.9.0 and above).