Skip to content
Advertisement

laravel 4.2 liebig package work on localhost but fail in server cron job command

i want to fire some function to get news about football from rss i used laravel4.2 https://github.com/liebig/cron as that

Event::listen('cron.collectJobs', function() {
Cron::add('football', '* * * * *', function() {
      //the controller of function
                $news=new News_feedController();
                $news->football();
                return 'success';
            });
         });
 $report = Cron::run();

it work correctly when i use cmd

php artisan cron:run

in my computer but when use the server cron job command

          • /usr/bin/php /home/public_html/interestoo.com/artisan cron:run

i don’t find any change in

cron_job

table but find data in

cron_manager

table and the cron job function did not work i’m sure that the path

/home/sfathy/public_html/interestoo.com/

in command is true and does not find any reason for that problem any help please.

Advertisement

Answer

you might want to give this a try usr/bin/php5 /home/public_html/interestoo.com/artisan cron:run due to laravel required php>=5.4

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement