1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

More cron tweaking

This commit is contained in:
CaMer0n
2009-10-24 10:39:42 +00:00
parent 8b63d669a9
commit 4dabb0b3e3

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/cron.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/cron.php,v $
| $Revision: 1.8 $ | $Revision: 1.9 $
| $Date: 2009-10-24 10:15:05 $ | $Date: 2009-10-24 10:39:42 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -99,7 +99,7 @@ class cron
function lastRefresh() function lastRefresh()
{ {
global $pref;
e107::getCache()->CachePageMD5 = '_'; e107::getCache()->CachePageMD5 = '_';
$lastload = e107::getCache()->retrieve('cronLastLoad',FALSE,TRUE,TRUE); $lastload = e107::getCache()->retrieve('cronLastLoad',FALSE,TRUE,TRUE);
$mes = e107::getMessage(); $mes = e107::getMessage();
@@ -110,6 +110,7 @@ class cron
$mes->add("Status: <b>".$status."</b>", E_MESSAGE_INFO); $mes->add("Status: <b>".$status."</b>", E_MESSAGE_INFO);
// print_a($pref['e_cron_pref']);
if($pref['e_cron_pref']) // grab cron if($pref['e_cron_pref']) // grab cron
{ {
@@ -124,11 +125,12 @@ class cron
$mes->add("Active Crons: <b>".count($list)."</b>", E_MESSAGE_INFO); $mes->add("Active Crons: <b>".count($list)."</b>", E_MESSAGE_INFO);
$mes->add("Last cron refresh was ".$ago.' seconds ago.', E_MESSAGE_INFO); $mes->add("Last cron refresh was ".$ago.' seconds ago.', E_MESSAGE_INFO);
if(!$active) if(!$active)
{ {
$setpwd_message = "Use the following Cron Command:<br /><b style='color:black'>".$_SERVER['DOCUMENT_ROOT'].e_HTTP."cron.php ".$pref['e_cron_pwd']."</b><br /> $setpwd_message = "Use the following Cron Command: <b style='color:black'>".$_SERVER['DOCUMENT_ROOT'].e_HTTP."cron.php ".$pref['e_cron_pwd']."</b><br />
This cron command is unique and will not be displayed again. Please copy and paste it into your webserver cron area to be run every minute of every day."; Please configure your webserver cron to run this command every minute.";
$mes->add($setpwd_message, E_MESSAGE_INFO); $mes->add($setpwd_message, E_MESSAGE_INFO);
} }
} }
@@ -282,7 +284,8 @@ function setCronPwd()
$core_cron = $this->coreCrons; $core_cron = $this->coreCrons;
$new_cron = array(); $new_cron = array();
if(vartrue($pref['e_cron_list']))
{
foreach($pref['e_cron_list'] as $key=>$val) foreach($pref['e_cron_list'] as $key=>$val)
{ {
$eplug_cron = array(); $eplug_cron = array();
@@ -311,6 +314,7 @@ function setCronPwd()
} }
} }
}
$e_cron = array_merge($core_cron,$new_cron); $e_cron = array_merge($core_cron,$new_cron);