method runTaskSystem documentation in bbn\Cron\Runner

function() { if ($this->check()) { //$this->output(X::_('Start task system'), Date('Y-m-d H:i:s')); $this->timer->start('timeout'); $ok = true; while ($ok) { if (!$this->isActive() || !$this->isCronActive()) { //$this->output(X::_('End'), Date('Y-m-d H:i:s')); if ($rows = $this->cron->getManager()->getRunningRows()) { foreach ($rows as $r) { if (file_exists('/proc/' . $r['pid'])) { exec('kill -9 ' . $r['pid']); //$this->output(X::_('Killing task'), $r['pid']); } $fpid = $this->getPidPath(['type' => 'cron', 'id' => $r['id']]); if (is_file($fpid)) { unlink($fpid); //$this->output(X::_('Deleting PID file'), $fpid); } $this->cron->getManager()->unsetPid($r['id']); } } exit(); } if ($rows = $this->cron->getManager()->getNextRows(0)) { foreach ($rows as $r) { $param = [ 'type' => 'cron', 'id' => $r['id'], 'file' => $r['file'] ]; //$this->output(X::_('Launch'), Date('Y-m-d H:i:s')); //$this->output(X::_('Execution'), $param['file']); $this->cron->getLauncher()->launch($param); } } sleep(10); } } }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.