php - Cron Job Does Not Sop after task completion -


how stop cron job after task completed?

the job of cron transfer set no. of email id's 1 sql table using given specific restrictions. task executes not stop. re-runs add duplicate values table limit setting in php file not working.

i have posted code here......

    <?php     $con = mysql_connect("","","") or die(mysql_error());      mysql_select_db("email_vijaya",$con) or die(mysql_error());      session_start();     ?>     <?php  $ref = mysql_query("select * email_transford_count status = '1'"); ?>      <?php if(mysql_num_rows($ref) == '0')  { ?>      <?php } else { ?>      <?php while($yr = mysql_fetch_array($ref)) { ?>      <?php $actual_count = $yr['actual_count']; ?>      <?php $uploaded_ctual = $yr['rest_count']; ?>      <?php $rest = ($actual_count)*1-($uploaded_ctual)*1; ?>      <?php $re = $yr['rest_count']; ?>      <?php  if($actual_count >= $uploaded_ctual) { ?>      <?php $country = mysql_query("select email_ids edata city = '".$yr['city']."' , category = '".$yr['category']."' limit $re"); ?>      <div class="email_css">      <?php while($u = mysql_fetch_assoc($country)) { ?>      <?php mysql_query("update email_transford_count set rest_count = rest_count+1 user_id = '".$yr['user_id']."' , category = '".$yr['category']."' , status = '1' "); ?>     <?php  if($actual_count >= $uploaded_ctual) { ?>     <?php mysql_query("insert edata_clienttransfered values ('','".$yr['user_id']."','".$u['email_ids']."','".$yr['category']."','1')"); ?>      <?php } ?>      <?php } ?>      <?php  } else { ?>      <?php mysql_query("update email_transford_count set status = '2'      user_id = '".$yr['user_id']."' , status = '1'"); ?>       <?php } ?>      <?php } ?>      <?php }  ?> 


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -