Handles a single tick of this task and calls the onTick lifecycle function. If ticks are disabled by allowTick, this function does nothing.