• <legend id='VTSws'><style id='VTSws'><dir id='VTSws'><q id='VTSws'></q></dir></style></legend>

    1. <small id='VTSws'></small><noframes id='VTSws'>

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

        使用 CRON 作业执行 PHP 脚本

        Executing a PHP script with a CRON Job(使用 CRON 作业执行 PHP 脚本)

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

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

                <bdo id='CdKwT'></bdo><ul id='CdKwT'></ul>
                  <tbody id='CdKwT'></tbody>
                <i id='CdKwT'><tr id='CdKwT'><dt id='CdKwT'><q id='CdKwT'><span id='CdKwT'><b id='CdKwT'><form id='CdKwT'><ins id='CdKwT'></ins><ul id='CdKwT'></ul><sub id='CdKwT'></sub></form><legend id='CdKwT'></legend><bdo id='CdKwT'><pre id='CdKwT'><center id='CdKwT'></center></pre></bdo></b><th id='CdKwT'></th></span></q></dt></tr></i><div id='CdKwT'><tfoot id='CdKwT'></tfoot><dl id='CdKwT'><fieldset id='CdKwT'></fieldset></dl></div>
                <tfoot id='CdKwT'></tfoot>
                  本文介绍了使用 CRON 作业执行 PHP 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想每天午夜运行一个 PHP 脚本.在研究了如何做到这一点之后,似乎实现这一目标的最佳方法是使用 CRON 作业.

                  I would like to run a PHP script every day at midnight. After research on how to do this, it appears that the best way to achieve this is to use a CRON job.

                  如果我的 php 脚本位于 http://example.com/scripts/scriptExample.php,有人可以展示这个 CRON 命令的最简单示例吗?

                  If my php script was located at http://example.com/scripts/scriptExample.php, can somebody be able to show the most simple example of what this CRON command would look like?

                  我浏览了许多帖子,但找不到一个足够简单的示例供我学习和构建.

                  I have looked through numerous posts but I cannot find a simple enough example for me to learn and build upon.

                  推荐答案

                  Crontab 需要服务器上的完整路径.

                  Crontab needs the full path on your server.

                  0 0 * * * php /var/www/vhosts/domain.com/httpdocs/scripts/example.php
                  

                  这将在每天午夜执行.

                  这篇关于使用 CRON 作业执行 PHP 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)
                      <tbody id='4YVBf'></tbody>

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

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

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