function do_server_stuff() { global $gbl, $sgbl, $login, $ghtml; //dprint("in Do server stuff\n"); if (if_demo()) { return; } try { timed_execution(); if ($sgbl->is_this_master()) { $schour = null; $schour = $login->getObject('general')->generalmisc_b->scavengehour; $scminute = $login->getObject('general')->generalmisc_b->scavengeminute; //dprint("Cron exec $schour, $scminute\n"); if ($schour) { cron_exec($schour, $scminute, "exec_scavenge"); } else { cron_exec("3", "57", "exec_scavenge"); } } } catch (exception $e) { print "Caught Exception: "; print $e->getMessage(); print "\n"; } }
function do_server_stuff() { global $gbl, $sgbl, $login, $ghtml; if (if_demo()) { return; } try { timed_execution(); if ($sgbl->is_this_master()) { $schour = null; $scminute = null; $timefile = "../etc/conf/scavenge_time.conf"; if (lxfile_exists($timefile)) { $readvalue = file_get_contents($timefile); $readvalue = explode(" ", $readvalue); $schour = $readvalue['0']; $scminute = $readvalue['1']; } log_log("cron_exec", "Initialize Scavenge Cronjob"); if ($schour) { cron_exec($schour, $scminute, "exec_scavenge"); } else { cron_exec("03", "35", "exec_scavenge"); } } } catch (exception $e) { print "Caught Exception: "; print $e->getMessage(); print "\n"; } }