[ADDED] Force run even if cron is active with -f

This commit is contained in:
Sebastian Grewe 2014-02-16 08:31:47 +01:00
parent 71162d0d67
commit 6f5d866bb9
2 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ foreach ($argv as $option) {
switch ($option) {
case '-f':
$monitoring->setStatus($cron_name . "_disabled", "yesno", 0);
$monitoring->setStatus($cron_name . "_active", "yesno", 0);
break;
}
}

View File

@ -100,7 +100,7 @@ class Monitoring extends Base {
public function startCronjob($cron_name) {
$aStatus = $this->getStatus($cron_name . '_active');
if ($aStatus['value'] == 1) {
$this->setErrorMessage('Cron is already active in database: ' . $cron_name . '_active is 1');
$this->setErrorMessage('Cron is already active in database: ' . $cron_name . '_active is 1, please force run with -f once ensured it\' not running');
return false;
}
$this->setStatus($cron_name . "_active", "yesno", 1);