[ADDED] Force run even if cron is active with -f
This commit is contained in:
parent
71162d0d67
commit
6f5d866bb9
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user