<legend id='V1y40'><style id='V1y40'><dir id='V1y40'><q id='V1y40'></q></dir></style></legend>

      <tfoot id='V1y40'></tfoot>

        <small id='V1y40'></small><noframes id='V1y40'>

        • <bdo id='V1y40'></bdo><ul id='V1y40'></ul>
        <i id='V1y40'><tr id='V1y40'><dt id='V1y40'><q id='V1y40'><span id='V1y40'><b id='V1y40'><form id='V1y40'><ins id='V1y40'></ins><ul id='V1y40'></ul><sub id='V1y40'></sub></form><legend id='V1y40'></legend><bdo id='V1y40'><pre id='V1y40'><center id='V1y40'></center></pre></bdo></b><th id='V1y40'></th></span></q></dt></tr></i><div id='V1y40'><tfoot id='V1y40'></tfoot><dl id='V1y40'><fieldset id='V1y40'></fieldset></dl></div>
      1. 无法通过 cron 作业使用自定义 Laravel Artisan 命令

        时间:2023-10-31
      2. <small id='zBaFz'></small><noframes id='zBaFz'>

        • <bdo id='zBaFz'></bdo><ul id='zBaFz'></ul>
          <tfoot id='zBaFz'></tfoot>
          <legend id='zBaFz'><style id='zBaFz'><dir id='zBaFz'><q id='zBaFz'></q></dir></style></legend>

        • <i id='zBaFz'><tr id='zBaFz'><dt id='zBaFz'><q id='zBaFz'><span id='zBaFz'><b id='zBaFz'><form id='zBaFz'><ins id='zBaFz'></ins><ul id='zBaFz'></ul><sub id='zBaFz'></sub></form><legend id='zBaFz'></legend><bdo id='zBaFz'><pre id='zBaFz'><center id='zBaFz'></center></pre></bdo></b><th id='zBaFz'></th></span></q></dt></tr></i><div id='zBaFz'><tfoot id='zBaFz'></tfoot><dl id='zBaFz'><fieldset id='zBaFz'></fieldset></dl></div>

                    <tbody id='zBaFz'></tbody>
                  本文介绍了无法通过 cron 作业使用自定义 Laravel Artisan 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  当我通过 SSH 连接时,我有自定义的 Artisan 命令在本地以及我的生产服务器上运行,但对任何 cron 作业都不可用.我什至尝试以运行 cron 作业的用户身份运行它,并且在我的控制台上运行良好.

                  I have custom Artisan commands that run locally as well as on my production server when I am SSH'd in, but are unavailable to any cron jobs. I've even tried running it as the user the cron job runs as and it works fine from my console.

                  当我在上述设置中运行 php artisan 时,我的自定义命令会列出并可用.但是,当我将 php artisan 作为 cron 作业运行时,它们没有列出.

                  When I run php artisan in the above settings, my custom commands are listed and available. However, they are not listed when I run php artisan as a cron job.

                  此外,尝试将自定义命令 php artisan subject:calculate 作为 cron 作业运行会导致以下错误:

                  Furthermore, trying to run the custom command php artisan subjects:calculate as a cron job results in the following error:

                  <代码>[无效参数异常]
                  主题"命名空间中没有定义命令.

                  推荐答案

                  我遇到了同样的错误,我找到了解决方案.第一次失败的尝试

                  I was fighting with the same error and I found the solution. First failed attempts

                  */5 * * * * /usr/bin/php /home/mysite/public_html/artisan my:command
                  
                  */5 * * * * php /home/mysite/public_html/artisan my:command
                  

                  解决方案

                  */5 * * * * /usr/local/bin/php /home/mysite/public_html/artisan my:command
                  

                  这篇关于无法通过 cron 作业使用自定义 Laravel Artisan 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:从 laravel eloquent 中的数据透视表中获取计数 下一篇:Facebook 使用 Sentry 登录,用户 [email] 需要密码,没有给出

                  相关文章

                1. <legend id='1BVKu'><style id='1BVKu'><dir id='1BVKu'><q id='1BVKu'></q></dir></style></legend>
                    <i id='1BVKu'><tr id='1BVKu'><dt id='1BVKu'><q id='1BVKu'><span id='1BVKu'><b id='1BVKu'><form id='1BVKu'><ins id='1BVKu'></ins><ul id='1BVKu'></ul><sub id='1BVKu'></sub></form><legend id='1BVKu'></legend><bdo id='1BVKu'><pre id='1BVKu'><center id='1BVKu'></center></pre></bdo></b><th id='1BVKu'></th></span></q></dt></tr></i><div id='1BVKu'><tfoot id='1BVKu'></tfoot><dl id='1BVKu'><fieldset id='1BVKu'></fieldset></dl></div>
                    • <bdo id='1BVKu'></bdo><ul id='1BVKu'></ul>

                    <small id='1BVKu'></small><noframes id='1BVKu'>

                      <tfoot id='1BVKu'></tfoot>