Skip to content
Snippets Groups Projects
Commit 40fbc9a6 authored by Jared Hancock's avatar Jared Hancock
Browse files

Abort cron duties if upgrade is pending

parent fdfba0ec
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,10 @@ class Cron {
}
function run(){ //called by outside cron NOT autocron
global $ost;
if (!$ost || $ost->isUpgradePending())
return;
self::MailFetcher();
self::TicketMonitor();
self::PurgeLogs();
......
......@@ -32,7 +32,7 @@ ob_start(); //Keep the image output clean. Hide our dirt.
$sec=time()-$_SESSION['lastcroncall'];
$caller = $thisstaff->getUserName();
if($sec>180): //user can call cron once every 3 minutes.
if($sec>180 && $ost && !$ost->isUpgradePending()): //user can call cron once every 3 minutes.
require_once(INCLUDE_DIR.'class.cron.php');
$thisstaff = null; //Clear staff obj to avoid false credit internal notes & auto-assignment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment