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

files: Cleanup orphaned files on autocron

parent 7a554bf7
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