#!/usr/bin/php -q
Sent from cron: ".$pwd."
Stored in e107: ".$pref['e_cron_pwd']."
You should regenerate the cron command in admin and enter it again in your server configuration.
";
sendemail($pref['siteadminemail'], "e107 - Cron Schedule Misconfigured.", $message, $pref['siteadmin'],$pref['siteadminemail'], $pref['siteadmin']);
exit;
}
e107::getCache()->CachePageMD5 = '_';
e107::getCache()->set('cronLastLoad',time(),TRUE,FALSE,TRUE);
// from the plugin directory:
// realpath(dirname(__FILE__)."/../../")."/";
$list = array();
$sql = e107::getDb();
if($sql->db_Select("cron",'cron_function,cron_tab','cron_active =1'))
{
while($row = $sql->db_Fetch(MYSQL_ASSOC))
{
list($class,$function) = explode("::",$row['cron_function'],2);
$key = $class."__".$function;
$list[$key] = array(
'path' => $class,
'active' => 1,
'tab' => $row['cron_tab'],
'function' => $function,
'class' => $class
);
}
}
// foreach($pref['e_cron_pref'] as $func=>$cron)
// {
// if($cron['active']==1)
// {
// $list[$func] = $cron;
// }
// }
if($_E107['debug'] && $_SERVER['QUERY_STRING'])
{
echo "
";
// $cron->getLastRan() returns last due time in an array
// print_a($cron->getLastRan());
// echo "Debug:
" . nl2br($cron->getDebug());
/*
$cron_str1 = "3 12 * * *";
if ($cron->calcLastRan($cron_str1))
{
echo "
Cron '$cron_str1' last due at: " . date('r', $cron->getLastRanUnix()) . "
";
print_r($cron->getLastRan());
}
else
{
echo "Error parsing";
}
echo "Debug:
" . nl2br($cron->getDebug());
*/
exit;
?>