public function isDue(DateTime $date = null)
    {
        // The execution time is being defaulted if not defined
        if (! $this->executionTime) {
            $this->at('* * * * *');
        }

        $date = $date !== null ? $date : $this->creationTime;

        if ($this->executionYear && $this->executionYear !== $date->format('Y')) {
            return false;
        }

        return $this->executionTime->isDue($date);
    }
public function isDue(DateTime $date = null)
    {
        // The execution time is being defaulted if not defined
        if (! $this->executionTime) {
            $this->at('* * * * *');
        }

        $date = $date !== null ? $date : $this->creationTime;

        if ($this->executionYear && $this->executionYear !== $date->format('Y')) {
            return false;
        }

        return $this->executionTime->isDue($date);
    }
public function isDue ( DateTime $ date = null ) { // The execution time is being defaulted if not defined if ( ! $ this -> executionTime ) { $ this -> at ( '* * * * *' ) ; } $ date = $ date !== null ? $ date : $ this -> creationTime ; if ( $ this -> executionYear && $ this -> executionYear !== $ date -> format ( 'Y' ) ) { return false ; } return $ this -> executionTime -> isDue ( $ date ) ; }
Check if the Job is due to run.
It accepts as input a DateTime used to check if
the job is due. Defaults to job creation time.
It also defaults the execution time if not previously defined.

@param  DateTime  $date
@return bool
Check if the Job is due to run . It accepts as input a DateTime used to check if the job is due . Defaults to job creation time . It also defaults the execution time if not previously defined .