本文整理汇总了PHP中cron::run_script方法的典型用法代码示例。如果您正苦于以下问题:PHP cron::run_script方法的具体用法?PHP cron::run_script怎么用?PHP cron::run_script使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cron
的用法示例。
在下文中一共展示了cron::run_script方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$bossid =array();
$userid = array();
for($i=0;$i<count($ares);$i++)
{
$bossid = $ares[$i]['boss_id'];
$userid = $ares[$i]['user_id'];
$userqry = "select username,password,email from $user_table where user_id='$userid'";
$userres = $db_object->get_a_line($userqry);
$bossqry = "select username,password,email from $user_table where user_id='$bossid'";
$bossres = $db_object->get_a_line($bossqry);
//send mail
$to = $bossres['email'];
$tousername = $bossres['username'];
$from = $userres['email'];
$username = $userres['username'];
$path = $common->http_path;
$path = $path."/performance/approve_objective_list.php";
$mess = preg_replace("/{{(.*?)}}/e","$$1",$message);
$common->send_mail($to,$subject,$mess,$from);
}
}//end
}//end class
$ob = new cron;
$ob->run_script($db_object,$common);
?>
示例2: and
}
//check the frequency
$freqry = "select frequency,$approved_affected.user_id as userid,$feedback.request_from as requestfrom,
s_date,f_id,status from $approved_affected,$feedback where $approved_affected.sl_id=$feedback.sl_id and
$approved_affected.user_id=$feedback.user_id and (to_days(now())- to_days($feedback.s_date)) = $approved_affected.frequency";
$freqres = $db_object->get_rsltset($freqry);
for($j=0;$j<count($freqres);$j++)
{
$status = $freqres[$j]['status'];
$fid = $freqres[$j]['f_id'];
//A = APPROVED
if($status=='A')
{
$update = "update $feedback set status='I',s_date=now(),latest='' where f_id='$fid'";
$db_object->insert($update);
}
}
echo $err['cMailsent'];
}
}//end class
$ob = new cron;
$ob->run_script($db_object,$common,$error_msg);
?>