View Single Post
  #1  
Old 19th February 2012, 02:43
Adey Adey is offline
Member
 
Join Date: Feb 2012
P2P
Posts: 9
Unhappy CRON JOBS ( auto rank updating) doesn't work
Hello I have got problem with cron jobs in auto rank updating.
CRON doesn't work (even original one ) in TSSE 5.6 v1.2

PHP Code:
if (intval ($promote_gig_limit))
  {
    
$limit $promote_gig_limit 1024 1024 1024 50;
    
$query mysql_query ('SELECT id FROM users WHERE usergroup =1 AND enabled = \'yes\' AND uploaded >= ' $limit_user ' AND (uploaded / downloaded) >= \'1.5\'');
 
    ++
$CQueryCount;
    if (
mysql_num_rows ($query))
    {
      
$userids = array ();
      while (
$arr mysql_fetch_assoc ($query))
      {
        
$userids[] = $arr['id'];
      }

      if (
count ($userids))
      {
        
mysql_query ('UPDATE users SET usergroup =2 , modcomment = CONCAT(\'' gmdate ('Y-m-d') . ' - Promoted to POWER USER by -AutoSystem.
\', modcomment) WHERE id IN (0,' 
implode (','$userids) . ')');
        ++
$CQueryCount;
        
savelog ('Following user(s) has been promoted to Power User Class: ' implode (', '$userids) . '. Reason: Automatic Promotion System!');
        ++
$CQueryCount;
        foreach (
$userids as $pid)
        {
          
send_pm ($pid$lang->cronjobs['promote_message'], $lang->cronjobs['promote_subject']);
          ++
$CQueryCount;
        }
      }
      unset (
$limit);
      unset (
$maxdt);
      unset (
$userids);
      unset (
$pid);
    }
  } 
No Errors when running CRON directly with
PHP Code:
error_reporting(E_ALL); 

Could anyone help me out with that issue?
Reply With Quote