Example #1
0
        } else {
            //
        }
    }
}
$opTasks->free();
# Remove First
$result = array_diff($currJobs, $remJobs);
# Add Jobs
foreach ($addJobs as $k => $v) {
    $result[] = $v;
}
# Get Backup ?
# Save Jobs
exec("crontab -r");
$letChr->saveJobs($result);
$debugs[] = '* Cron Tab Updated';
/* Clear Resource Caches */
$fileCounts = 0;
$opOrgs = $myconn->query("SELECT * FROM " . db_table_pref . "organizations") or die(mysqli_error($myconn));
while ($opOrgsRs = $opOrgs->fetch_assoc()) {
    $orgFold = LETHE_RESOURCE . DIRECTORY_SEPARATOR . $opOrgsRs['orgTag'] . '/expimp';
    $fileList = getDirFiles($orgFold);
    $now = time();
    $days = 1;
    foreach ($fileList as $k => $v) {
        if ($v['file_date'] < $now - 60 * 60 * 24 * $days) {
            if (unlink($orgFold . DIRECTORY_SEPARATOR . $v['file_name'])) {
                $fileCounts++;
            }
        }