Skip to content

Commit

Permalink
[ADDED] Force run even if cron is active with -f
Browse files Browse the repository at this point in the history
  • Loading branch information
MPOS123 committed Feb 16, 2014
1 parent 71162d0 commit 6f5d866
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cronjobs/shared.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function cfip() { return (@defined('SECURITY')) ? 1 : 0; }
switch ($option) {
case '-f':
$monitoring->setStatus($cron_name . "_disabled", "yesno", 0);
$monitoring->setStatus($cron_name . "_active", "yesno", 0);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/include/classes/monitoring.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function setStatus($name, $type, $value) {
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);
Expand Down

0 comments on commit 6f5d866

Please sign in to comment.