// The script itself determines what to do at which hour of the day or day of the week or day of the month. if (!$client) { if ($minute == 5) { Sprint_Logic::burndown("", false); } } // A flag is set upon installation, so it (re-)generates the stylesheets once. $create_css_flag = "../dyncss/create_css.txt"; if (file_exists($create_css_flag)) { unlink($create_css_flag); Styles_Sheets::create_all(); } // Export the Bibles to the various output formats. // This may take an hour on a production machine. if ($hour == 1 && $minute == 10) { Export_Logic::scheduleAll(); } // Re-index Bible and notes. if ($hour == 2 && $minute == 0) { $directory = dirname(__DIR__) . "/search"; Tasks_Logic::queue(Tasks_Logic::PHP, array("{$directory}/rebibles.php")); $directory = dirname(__DIR__) . "/search"; Tasks_Logic::queue(Tasks_Logic::PHP, array("{$directory}/renotes.php")); } // Delete temporal files older than a few days. if ($hour == 2 && $minute == 0) { Tasks_Logic::queue(Tasks_Logic::PHP, array(__DIR__ . "/temp.php")); } // Email statistics to the users. if (!$client) { if ($hour == 3 && $minute == 0) {