src/Cronner/Tasks/Task.php
public function shouldBeRun(DateTimeInterface $now = NULL) : bool
	{
		if ($now === NULL) {
			$now = new DateTime();
		}

		$parameters = $this->getParameters();
		if (!$parameters->isTask()) {
			return FALSE;
		}
		$this->timestampStorage->setTaskName($parameters->getName());

		return $parameters->isInDay($now)
			&& $parameters->isInTime($now)
			&& $parameters->isNextPeriod($now, $this->timestampStorage->loadLastRunTime());
	}
public function shouldBeRun(DateTimeInterface $now = NULL) : bool
	{
		if ($now === NULL) {
			$now = new DateTime();
		}

		$parameters = $this->getParameters();
		if (!$parameters->isTask()) {
			return FALSE;
		}
		$this->timestampStorage->setTaskName($parameters->getName());

		return $parameters->isInDay($now)
			&& $parameters->isInTime($now)
			&& $parameters->isNextPeriod($now, $this->timestampStorage->loadLastRunTime());
	}
public function shouldBeRun ( DateTimeInterface $ now = NULL ) : bool { if ( $ now === NULL ) { $ now = new DateTime ( ) ; } $ parameters = $ this -> getParameters ( ) ; if ( ! $ parameters -> isTask ( ) ) { return FALSE ; } $ this -> timestampStorage -> setTaskName ( $ parameters -> getName ( ) ) ; return $ parameters -> isInDay ( $ now ) && $ parameters -> isInTime ( $ now ) && $ parameters -> isNextPeriod ( $ now , $ this -> timestampStorage -> loadLastRunTime ( ) ) ; }
Returns True if given parameters should be run.
Returns True if given parameters should be run .