我已经下了命令,安排每30分钟一次。当我运行时php artisan schedule:run
,它工作得很好,并返回预期的结果,但是当我在实时服务器上配置它时,我的 cron 作业确实运行,但它没有重新调整成功消息,而是返回了我的 laravel 项目中所有可用命令的列表。这就是我正在做的事情。
命令内核:
$schedule->command('update:callLogs')
->everyMinute();
Run Code Online (Sandbox Code Playgroud)
克朗条目:
/usr/bin/php /home/ddsas9rm2f1g/public_html/clowdlink.com/crm/artisan schedule:run
Run Code Online (Sandbox Code Playgroud)
这就是我得到的回应
Laravel 框架 5.8.38
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
(List of all availabe commands)
Run Code Online (Sandbox Code Playgroud)
任何帮助都感激不尽。
编辑 现在我的命令看起来像这样
* * * * * cd /home/ddsas9rm2f1g/public_html/clowdlink.com/crm && php artisan update:callLogs
Run Code Online (Sandbox Code Playgroud)
但得到相同的响应,而当我复制相同的命令并使用 putty 运行相同的命令时,它工作得很好。现在已经过去一周了,我仍然停留在这个 cron 的事情上。
当我部署一个应用程序时,我也面临着巨大的挑战,并最终设法解决了这个问题:
cd /path-to-project && /opt/cpanel/ea-php71/root/opt/cpanel/ea-php74/root/usr/bin/php-cgi artisan schedule:run
Run Code Online (Sandbox Code Playgroud)
我的应用程序使用 Laravel 5.7
归档时间: |
|
查看次数: |
9140 次 |
最近记录: |