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

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

      1. <tfoot id='O60fU'></tfoot>

      2. PHP - 好的 cronjob/crontab/cron 教程或书籍

        PHP - good cronjob/crontab/cron tutorial or book(PHP - 好的 cronjob/crontab/cron 教程或书籍)
        • <bdo id='1Fr6W'></bdo><ul id='1Fr6W'></ul>

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

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

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

                  <tbody id='1Fr6W'></tbody>
              2. <legend id='1Fr6W'><style id='1Fr6W'><dir id='1Fr6W'><q id='1Fr6W'></q></dir></style></legend>
                  本文介绍了PHP - 好的 cronjob/crontab/cron 教程或书籍的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在寻找一个好的 cronjob 教程或书籍来学习如何使用 PHP 创建一个.

                  I'm looking for a good cronjob tutorial or book to learn how to create one using PHP.

                  推荐答案

                  Cronjob 不是创建为 PHP 进程或脚本的东西.Cron 是一个 Linux 程序,它允许您定期调用脚本.

                  Cronjob is not something to create as Php process or script. Cron is a linux program that allows you to call a script at a regular interval.

                  您可以通过以管理员用户身份进入您的 linux 机器并键入:

                  You can see what is an crontab by entering in your linux machine as an admin user and type:

                  root@valugi:~# crontab -e
                  

                  你会看到类似的东西

                  */1 * * * * /usr/bin/php /var/www/somesite/public/cron.php
                  

                  这意味着我每分钟都在执行 cron.php.

                  This means that each minute I am executing the cron.php.

                  现在,您可能希望在不同时间执行不同的脚本,并希望将此逻辑传递到 php 级别而不是 linux 级别.如果是这种情况,您可能希望以最低的时间分母(例如分钟)调用您的 cron 脚本,并在 cron.php 中构建一些将在不同时间调用其他脚本的逻辑.

                  Now, you may want to have different scripts executed at different times and want to pass this logic to php level instead of linux level. If this is the case you may want to call your cron script at the lowest time denominator (minute for example) and in the cron.php build some logic that will call at different times other scripts.

                  我使用例如 Cronable 接口:

                  I use for example a Cronable interface:

                  interface Cronable {
                      public function cron();
                  }
                  

                  并且每个想要被cron.php调用的类都必须实现这个接口和cron()函数,它会指定具体的调用频率是多少.cron.php 将获取所有这些类,并将当前时间与该时间进行比较,并决定是否执行调用.

                  And each class that wants to be called by the cron.php has to implement this interface and the cron() function, which will specify what is the specific frequency of the call. The cron.php will get all this classes and will compare current time with that time and will decide to execute the call or not.

                  这篇关于PHP - 好的 cronjob/crontab/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 的问题)
                    <tbody id='eodE9'></tbody>

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

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

                          <bdo id='eodE9'></bdo><ul id='eodE9'></ul>