我想启动一些函数从rss获取足球新闻我用了laravev4.2https://github.com/liebig/cron作为
Event::listen('cron.collectJobs', function() {
Cron::add('football', '* * * * *', function() {
//the controller of function
$news=new News_feedController();
$news->football();
return 'success';
});
});
$report = Cron::run();
当我使用cmd 时,它工作正常
php artisan cron:运行
在我的电脑里但是当使用服务器cron作业命令时
- /usr/bin/php/home/public_html/enterestoo.com/artisan cron:run
我没有发现有任何变化
cron_job
表,但在中查找数据
cron_manager
表并且cron作业函数不起作用我确信的路径
/home/spathy/public_html/enterestoo.com/
in命令是正确的,并且没有找到任何导致该问题的原因请帮忙。
您可能需要尝试usr/bin/php5 /home/public_html/interestoo.com/artisan cron:run
,因为需要laravel php>=5.4