Monday, February 27, 2017

[SOLVED]Laravel + Crontab not working

I am trying to set up scheduler in Laravel.
Here is my crontab which I debugged and works fine - atleast with my cron job
* * * * * /bin/echo "foobar" >> /my_path/example.txt 

I don't know if this one works:
* * * * * php /var/www/myproject/artisan schedule:run 1>> /dev/null 2>&1

Here is my schedule function in Kernel:
   protected function schedule(Schedule $schedule)
    {
         $schedule->command('inspire')
                 ->everyMinute();
    }

When I am in my project and try php artisan inspire it actually works, so I expected it to fire every minute, but it won't do anything. Nothing happens.
Any ideas?


from Latest question asked on Laravel tag.


via prgrm

Advertisement