我的解决方案是,尝试设置您的cronjob每分钟运行。 但是,您应该保存您的cronjob的状态,以便它不会运行两次。
我通常做这种方式(请注意,这cron是旨在为每分钟运行):现在
if(stat_check_file('cron.stat'))
{
die("Found CRON.STAT, Exit!");
}
else
{
stat_create_stat_file('cron.stat');
//do your long process here...
}
stat_delete_stat_file('cron.stat');
function stat_check_file($filename)
{
global $rootdir;
return file_exists($rootdir.'/'.$filename);
}
function stat_create_stat_file($filename){
global $rootdir;
touch($rootdir.'/'.$filename);
}
function stat_delete_stat_file($filename)
{
global $rootdir;
if(stat_check_file($filename))
{
@unlink($rootdir.'/'.$filename);
}
}
,您的cronjob,只需装入XLS,运行它,并写日志要么数据库/文件。 然后在面板上阅读该日志并显示它,以便您的客户现在可以看到,发送了xxx电子邮件并发送了xxx电子邮件。