private function calculate()
    {
        $this->second = 0;

        $iters = 0;
        $maxIters = 100;
        while ($iters < $maxIters && !$this->satisfied()) {
            if ($this->params->minute !== '*' && ($this->minute != $this->params->minute)) {
                if ($this->minute > $this->params->minute) {
                    $this->modify('+1 hour');
                }

                $this->minute = $this->params->minute;
            }

            if ($this->params->hour !== '*' && ($this->hour != $this->params->hour)) {
                if ($this->hour > $this->params->hour) {
                    $this->modify('+1 day');
                }

                $this->hour = $this->params->hour;
                $this->minute = 0;
            }

            if ($this->params->week !== '*' && ($this->week != $this->params->week)) {
                $this->week = $this->params->week;
                $this->hour = 0;
                $this->minute = 0;
            }

            if ($this->params->day !== '*' && ($this->day != $this->params->day)) {
                if ($this->day > $this->params->day) {
                    $this->modify('+1 month');
                }

                $this->day = $this->params->day;
                $this->hour = 0;
                $this->minute = 0;
            }

            if ($this->params->month !== '*' && ($this->month != $this->params->month)) {
                if ($this->month > $this->params->month) {
                    $this->modify('+1 year');
                }

                $this->month = $this->params->month;
                $this->day = 1;
                $this->hour = 0;
                $this->minute = 0;
            }

            ++$iters;
        }
    }
private function calculate()
    {
        $this->second = 0;

        $iters = 0;
        $maxIters = 100;
        while ($iters < $maxIters && !$this->satisfied()) {
            if ($this->params->minute !== '*' && ($this->minute != $this->params->minute)) {
                if ($this->minute > $this->params->minute) {
                    $this->modify('+1 hour');
                }

                $this->minute = $this->params->minute;
            }

            if ($this->params->hour !== '*' && ($this->hour != $this->params->hour)) {
                if ($this->hour > $this->params->hour) {
                    $this->modify('+1 day');
                }

                $this->hour = $this->params->hour;
                $this->minute = 0;
            }

            if ($this->params->week !== '*' && ($this->week != $this->params->week)) {
                $this->week = $this->params->week;
                $this->hour = 0;
                $this->minute = 0;
            }

            if ($this->params->day !== '*' && ($this->day != $this->params->day)) {
                if ($this->day > $this->params->day) {
                    $this->modify('+1 month');
                }

                $this->day = $this->params->day;
                $this->hour = 0;
                $this->minute = 0;
            }

            if ($this->params->month !== '*' && ($this->month != $this->params->month)) {
                if ($this->month > $this->params->month) {
                    $this->modify('+1 year');
                }

                $this->month = $this->params->month;
                $this->day = 1;
                $this->hour = 0;
                $this->minute = 0;
            }

            ++$iters;
        }
    }
private function calculate ( ) { $ this -> second = 0 ; $ iters = 0 ; $ maxIters = 100 ; while ( $ iters < $ maxIters && ! $ this -> satisfied ( ) ) { if ( $ this -> params -> minute !== '*' && ( $ this -> minute != $ this -> params -> minute ) ) { if ( $ this -> minute > $ this -> params -> minute ) { $ this -> modify ( '+1 hour' ) ; } $ this -> minute = $ this -> params -> minute ; } if ( $ this -> params -> hour !== '*' && ( $ this -> hour != $ this -> params -> hour ) ) { if ( $ this -> hour > $ this -> params -> hour ) { $ this -> modify ( '+1 day' ) ; } $ this -> hour = $ this -> params -> hour ; $ this -> minute = 0 ; } if ( $ this -> params -> week !== '*' && ( $ this -> week != $ this -> params -> week ) ) { $ this -> week = $ this -> params -> week ; $ this -> hour = 0 ; $ this -> minute = 0 ; } if ( $ this -> params -> day !== '*' && ( $ this -> day != $ this -> params -> day ) ) { if ( $ this -> day > $ this -> params -> day ) { $ this -> modify ( '+1 month' ) ; } $ this -> day = $ this -> params -> day ; $ this -> hour = 0 ; $ this -> minute = 0 ; } if ( $ this -> params -> month !== '*' && ( $ this -> month != $ this -> params -> month ) ) { if ( $ this -> month > $ this -> params -> month ) { $ this -> modify ( '+1 year' ) ; } $ this -> month = $ this -> params -> month ; $ this -> day = 1 ; $ this -> hour = 0 ; $ this -> minute = 0 ; } ++ $ iters ; } }
Calculates the next run timestamp.
Calculates the next run timestamp .