Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does task scheduling in Lumen work just like in Laravel?

You can see task scheduling explained in the latest docs for Laravel, but Lumen's docs do not mention this. However, it looks like Lumen's Console Kernel file has a schedule method just like Laravel. Does scheduling work the same in both, or what are the caveats with scheduling in Lumen?

like image 293
prograhammer Avatar asked Oct 26 '15 22:10

prograhammer


1 Answers

Yes, yes it does! :) It works exactly the same.

crontab -e

And then add

* * * * * php /var/www/domain.com/public_html/artisan schedule:run 1>> /dev/null 2>&1

Come to think of it, the php artisan schedule:run kinda gives it away :p

like image 151
Stan Smulders Avatar answered Oct 25 '22 15:10

Stan Smulders