Php heroku调度器的一些问题

Php heroku调度器的一些问题,php,heroku,scheduled-tasks,Php,Heroku,Scheduled Tasks,我使用插件heroku scheduler Advanced scheduler。我创建了一个php脚本,它在CLI模式下工作,并像php/app/crons/pushnotifications.php一样启动。在我的Heroku计划中,我可以每10分钟运行一次脚本,为了每分钟运行一次,我尝试每分钟重新启动一次脚本 $start = time(); while ((time() - $start) <= 9*60) { $start_loop = time(); somet

我使用插件heroku scheduler Advanced scheduler。我创建了一个php脚本,它在CLI模式下工作,并像
php/app/crons/pushnotifications.php
一样启动。在我的Heroku计划中,我可以每10分钟运行一次脚本,为了每分钟运行一次,我尝试每分钟重新启动一次脚本

$start = time();
while ((time() - $start) <= 9*60)
{
    $start_loop = time();
    something to do...
    sleep(max(0, 60-(time() - $start_loop)));
}
$start=time();

while((time()-$start)我想您可以在命令末尾添加如下内容:

php path/file.php || echo "fail"
这将在失败时阻止webhook。
是的,这只是一次黑客攻击,但如果一切正常,并且您收到这样的错误消息,它将对您有用。

我认为失败可能在
要做的事情中的某个地方…
位。