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

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

  • <tfoot id='xHFNJ'></tfoot>

    • <bdo id='xHFNJ'></bdo><ul id='xHFNJ'></ul>

        Laravel 中的 Cron 作业

        Cron Job in Laravel(Laravel 中的 Cron 作业)
            <tbody id='BU8aZ'></tbody>
          1. <legend id='BU8aZ'><style id='BU8aZ'><dir id='BU8aZ'><q id='BU8aZ'></q></dir></style></legend>

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

              1. <tfoot id='BU8aZ'></tfoot>
                  <bdo id='BU8aZ'></bdo><ul id='BU8aZ'></ul>

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

                  本文介绍了Laravel 中的 Cron 作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试为我已经创建的命令开发一个 cron 作业.我对 cron 工作完全陌生,所以我真的不知道它是如何工作的.

                  I am trying to develop a cron job for a command I have already created. I am completely new to cron jobs so I dont really know how it works.

                  在控制台中自己尝试该命令效果很好.我所需要的只是能够每 24 小时执行一次.我正在使用 Laravel 4,有人可以帮忙吗?

                  Trying the command by myself in the console works perfectly. All I need is to be able to execute it every 24 hours. I am using Laravel 4, can anyone help?

                  谢谢!

                  推荐答案

                  要以 root 身份创建 cron 作业,请编辑您的 cron 文件:

                  To create a cron job as root, edit your cron file:

                  [sudo] crontab -e
                  

                  在最后添加一个新行,每一行都是一个cron作业:

                  Add a new line at the end, every line is a cron job:

                  25 10 * * * php /var/www/<siteName>/artisan <command:name> <parameters>
                  

                  这将在每天上午 10:25 执行相同的命令.

                  This will execute the same command at 10:25AM everyday.

                  只要确保在最后一行之后保留一个空行.您可能还需要使用 php 客户端的完整路径:

                  Just make sure you keep a blank line after the last one. And you also might need to use the full path of your php client:

                  25 10 * * * /usr/local/bin/php /var/www/<siteName>/artisan <command:name> <parameters>
                  

                  这篇关于Laravel 中的 Cron 作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <bdo id='4uh6n'></bdo><ul id='4uh6n'></ul>
                  • <i id='4uh6n'><tr id='4uh6n'><dt id='4uh6n'><q id='4uh6n'><span id='4uh6n'><b id='4uh6n'><form id='4uh6n'><ins id='4uh6n'></ins><ul id='4uh6n'></ul><sub id='4uh6n'></sub></form><legend id='4uh6n'></legend><bdo id='4uh6n'><pre id='4uh6n'><center id='4uh6n'></center></pre></bdo></b><th id='4uh6n'></th></span></q></dt></tr></i><div id='4uh6n'><tfoot id='4uh6n'></tfoot><dl id='4uh6n'><fieldset id='4uh6n'></fieldset></dl></div>

                      <tbody id='4uh6n'></tbody>

                    1. <legend id='4uh6n'><style id='4uh6n'><dir id='4uh6n'><q id='4uh6n'></q></dir></style></legend>

                          <tfoot id='4uh6n'></tfoot>

                            <small id='4uh6n'></small><noframes id='4uh6n'>