laravel 5.5 计划:运行 cron 作业在 cpanel 中不起作用 [英] laravel 5.5 schedule:run cron job not working in cpanel

查看:65
本文介绍了laravel 5.5 计划:运行 cron 作业在 cpanel 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在共享主机上有一个 laravel5.5 项目,并尝试运行 cron 作业来执行命令schedule:run",但它无法执行,我想我写错了命令:

I'm have a laravel5.5 project up on shared hosting and trying to run cron job to execute the command "schedule:run" but it just won't execute I think I'm writing the command wrong:

/usr/local/bin/php home/schoolco/prototype/artisan schedule:run >> /dev/null 2>&1

我的 Laravel 项目名称中的原型.该命令使用 ssh 在此目录中工作.如果您有任何观察或想法,请分享.

where prototype in the name of my laravel project. the command works in this directory using ssh. please if you have any observation or thought share it.

推荐答案

试试这个

/usr/local/bin/php /home/schoolco/prototype/artisan schedule:run > /dev/null 2>&1

并检查您是否在终端中调用了正确的 php 可执行文件:

And check are you calling right php executable in your terminal with:

$ which php

也许不是/usr/local/bin/php ,也许是/usr/bin/php

Maybe it is not /usr/local/bin/php , maybe /usr/bin/php

这篇关于laravel 5.5 计划:运行 cron 作业在 cpanel 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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