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

Merge pull request #1398 from greezybacon/issue/1391


files: Cleanup orphaned files on autocron

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 0e309d48 f82a4491
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,9 @@ class Cron {
self::MailFetcher();
self::TicketMonitor();
self::PurgeLogs();
self::CleanOrphanedFiles();
// Run file purging about every 10 cron runs
if (mt_rand(1, 9) == 4)
self::CleanOrphanedFiles();
self::PurgeDrafts();
self::MaybeOptimizeTables();
......
......@@ -44,6 +44,11 @@ require_once(INCLUDE_DIR.'class.cron.php');
$thisstaff = null; //Clear staff obj to avoid false credit internal notes & auto-assignment
Cron::TicketMonitor(); //Age tickets: We're going to age tickets regardless of cron settings.
// Run file purging about every 30 minutes
if (mt_rand(1, 9) == 4)
Cron::CleanOrphanedFiles();
if($cfg && $cfg->isAutoCronEnabled()) { //ONLY fetch tickets if autocron is enabled!
Cron::MailFetcher(); //Fetch mail.
$ost->logDebug(_S('Auto Cron'), sprintf(_S('Mail fetcher cron call [%s]'), $caller));
......
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