public function getTab() { ob_start(); $count = $this->cronner->countTasks(); require __DIR__ . '/templates/tab.phtml'; return ob_get_clean(); }
public function actionDefault() { $this->cronner->onTaskBegin[] = function (Cronner $cronner, Task $task) { echo '<h3>' . $task->getName() . '</h3>'; Debugger::timer($task->getName()); }; $this->cronner->onTaskFinished[] = function (Cronner $cronner, Task $task) { echo '<p>Total time: ' . Debugger::timer($task->getName()) . ' s</p>'; }; $this->cronner->run(); $this->terminate(); }