public function planNextRun()
    {
        if ($this->is_repeating_task && !empty($this->cron_expression)) {
            $this->status = DeferredQueue::STATUS_SCHEDULED;
            $cron = CronExpression::factory($this->cron_expression);
            $this->next_start = date('Y-m-d H:i:s', $cron->getNextRunDate()->getTimestamp());
            return true;
        } else {
            return false;
        }
    }
public function planNextRun()
    {
        if ($this->is_repeating_task && !empty($this->cron_expression)) {
            $this->status = DeferredQueue::STATUS_SCHEDULED;
            $cron = CronExpression::factory($this->cron_expression);
            $this->next_start = date('Y-m-d H:i:s', $cron->getNextRunDate()->getTimestamp());
            return true;
        } else {
            return false;
        }
    }
public function planNextRun ( ) { if ( $ this -> is_repeating_task && ! empty ( $ this -> cron_expression ) ) { $ this -> status = DeferredQueue :: STATUS_SCHEDULED ; $ cron = CronExpression :: factory ( $ this -> cron_expression ) ; $ this -> next_start = date ( 'Y-m-d H:i:s' , $ cron -> getNextRunDate ( ) -> getTimestamp ( ) ) ; return true ; } else { return false ; } }
Sets next_start field to the next future timstamp when we should run again repeating task.
If task is non-repeating and cron_expression is empty - false returned
Sets next_start field to the next future timstamp when we should run again repeating task . If task is non - repeating and cron_expression is empty - false returned