<?php
$push_dates_time = [];
$current_time = strtotime('now');
for($i = 18 ; $i <= 20 ; $i++) {
$time_dif = $i * 24 * 60 * 60;
$push_dates_time[] = $current_time - $time_dif;
}
foreach ($push_dates_time as $push_date_time) {
$shell = '/opt/php7/bin/php /srv/www/my-script/push/third_push_msg_count.php -e test -d ';
$shell .= date('Y-m-d',$push_date_time);
echo "{$shell} \n";
$output = shell_exec($shell);
print_r($output);
}
?>
在某段日期执行sql
最新推荐文章于 2020-12-15 11:18:36 发布