Lumen中的任务计划是否像Laravel中一样工作? [英] Does task scheduling in Lumen work just like in Laravel?

查看:66
本文介绍了Lumen中的任务计划是否像Laravel中一样工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以在最新的Laravel文档中看到任务调度,但Lumen的文档却没有提这个.但是,看起来 Lumen的控制台内核文件具有一个调度方法就像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?

推荐答案

是的,是的! :)它的工作原理完全相同.

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

crontab -e

然后添加

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

想想看,php artisan schedule:run有点把它丢了:p

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

这篇关于Lumen中的任务计划是否像Laravel中一样工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆