【发布时间】:2015-05-27 02:41:16
【问题描述】:
我想启动一些函数来从 rss 获取有关足球的新闻 我用 laravel4.2 https://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/interestoo.com/artisan cron:run
我没有发现任何变化
cron_job
表但在
中查找数据cron_manager
表 并且 cron 工作功能不起作用 我确定路径
/home/sfathy/public_html/interestoo.com/
in 命令为真,找不到导致该问题的任何原因 请帮忙。
【问题讨论】: