Crunz\Event::isDue PHP Méthode

isDue() public méthode

Determine if the given event should run based on the Cron expression.
public isDue ( ) : boolean
Résultat boolean
    public function isDue()
    {
        return $this->expressionPasses() && $this->filtersPass();
    }

Usage Example

Exemple #1
0
 public function testIsDue()
 {
     Carbon::setTestNow(Carbon::create(2015, 4, 12, 0, 0, 0));
     $e = new Event($this->id, 'php foo');
     $this->assertTrue($e->sundays()->isDue());
     $e = new Event($this->id, 'php bar');
     $this->assertEquals('0 19 * * 6 *', $e->saturdays()->at('19:00')->timezone('EST')->getExpression());
     $this->assertTrue($e->isDue());
 }