Does task scheduling in Lumen work just like in Laravel?

廉价感情. 提交于 2019-12-04 17:32:09

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/33356416/does-task-scheduling-in-lumen-work-just-like-in-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!