Cancel a task. Using this function sets the task error to cancelled_err and the task will not be executed. This function differs from del() as it will not remove the task.
This function generates a change.
task.cancel()
None
Returns nil
.
Example usage task.cancel():
t = task(datetime(), ||log('Dummy task'));
t.cancel(); // cancel the task before it can start
Return value in JSON format
null