Skip to content
Snippets Groups Projects
Commit 1fae01a1 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #594 from greezybacon/issue/594


Disable cron during upgrade

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents e5bf1fac 40fbc9a6
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,10 @@ class Cron { ...@@ -41,6 +41,10 @@ class Cron {
} }
function run(){ //called by outside cron NOT autocron function run(){ //called by outside cron NOT autocron
global $ost;
if (!$ost || $ost->isUpgradePending())
return;
self::MailFetcher(); self::MailFetcher();
self::TicketMonitor(); self::TicketMonitor();
self::PurgeLogs(); self::PurgeLogs();
......
...@@ -32,7 +32,7 @@ ob_start(); //Keep the image output clean. Hide our dirt. ...@@ -32,7 +32,7 @@ ob_start(); //Keep the image output clean. Hide our dirt.
$sec=time()-$_SESSION['lastcroncall']; $sec=time()-$_SESSION['lastcroncall'];
$caller = $thisstaff->getUserName(); $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'); require_once(INCLUDE_DIR.'class.cron.php');
$thisstaff = null; //Clear staff obj to avoid false credit internal notes & auto-assignment $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