public function complete()
    {
        $this->last_run_date = date('Y-m-d H:i:s', time());
        if (0 != $this->next_task_id) {
            $this->status = DeferredQueue::STATUS_SUCCESS_AND_NEXT;
        } else {
            $this->status = DeferredQueue::STATUS_COMPLETE;
        }

        if ($this->planNextRun() === true) {
            return $this->save();
        } else {
            if ($this->delete_after_run) {
                return $this->delete() !== false;
            } else {
                return $this->save();
            }
        }
    }
public function complete()
    {
        $this->last_run_date = date('Y-m-d H:i:s', time());
        if (0 != $this->next_task_id) {
            $this->status = DeferredQueue::STATUS_SUCCESS_AND_NEXT;
        } else {
            $this->status = DeferredQueue::STATUS_COMPLETE;
        }

        if ($this->planNextRun() === true) {
            return $this->save();
        } else {
            if ($this->delete_after_run) {
                return $this->delete() !== false;
            } else {
                return $this->save();
            }
        }
    }
public function complete ( ) { $ this -> last_run_date = date ( 'Y-m-d H:i:s' , time ( ) ) ; if ( 0 != $ this -> next_task_id ) { $ this -> status = DeferredQueue :: STATUS_SUCCESS_AND_NEXT ; } else { $ this -> status = DeferredQueue :: STATUS_COMPLETE ; } if ( $ this -> planNextRun ( ) === true ) { return $ this -> save ( ) ; } else { if ( $ this -> delete_after_run ) { return $ this -> delete ( ) !== false ; } else { return $ this -> save ( ) ; } } }
Schedules next launch or deletes queue item if it is not repeatable

@return bool Result of completing
@throws \Exception
Schedules next launch or deletes queue item if it is not repeatable