/** * */ public function run() { $this->jobby->run(); }
public function testShouldFailIfMaxRuntimeExceeded() { $jobby = new Jobby(); $jobby->add('slow job', ['command' => 'sleep 4', 'schedule' => '* * * * *', 'maxRuntime' => 1, 'output' => $this->logFile]); $jobby->run(); sleep(2); $jobby->run(); sleep(2); $this->assertContains('ERROR: MaxRuntime of 1 secs exceeded!', $this->getLogContent()); }