运行Laravel队列:在共享主机上工作 [英] Running laravel queue:work on a shared hosting

查看:76
本文介绍了运行Laravel队列:在共享主机上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的laravel队列:可以继续在共享主机上运行,​​这是共享主机(不在VPS上),我无法安装任何东西,因为当我使用几乎所有在线资源时,正在搜索此建议安装主管.所以基本上我以为我可以创建一个cron作业,检查队列是否未运行并启动它,有关如何执行此操作的任何帮助,因为有点卡住了,谢谢.

I want my laravel queue:work to keep running on a shared hosting, this is a shared hosting (am not on a VPS) I can't install anything because almost all online sources when I was searching for this suggest installing supervisor. So basically I thought I could just create a cron job that checks if queue is not running and starts it, any help on how to go about this because am kinda stuck, thanks.

P.S.我在Linux服务器和Laravel 5.3上

推荐答案

如上所述,您正在使用共享主机,请按照以下步骤操作.

As you mentioned you are using shared hosting, You follow the below steps.

第1步. 您需要将队列驱动程序设置为database

Step 1. you need to setup your queue driver as database

第2步 您需要使用以下命令来设置cron作业 php /path/to/application/artisan queue:work --queue=high,default.

Step 2 you need to setup a cron job with with the following command php /path/to/application/artisan queue:work --queue=high,default.

您可以尝试一下.我希望它能起作用.

You can give a try. I hope it will work.

这篇关于运行Laravel队列:在共享主机上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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