<tfoot id='ckiua'></tfoot>

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

    • <bdo id='ckiua'></bdo><ul id='ckiua'></ul>
    <legend id='ckiua'><style id='ckiua'><dir id='ckiua'><q id='ckiua'></q></dir></style></legend>
    1. <i id='ckiua'><tr id='ckiua'><dt id='ckiua'><q id='ckiua'><span id='ckiua'><b id='ckiua'><form id='ckiua'><ins id='ckiua'></ins><ul id='ckiua'></ul><sub id='ckiua'></sub></form><legend id='ckiua'></legend><bdo id='ckiua'><pre id='ckiua'><center id='ckiua'></center></pre></bdo></b><th id='ckiua'></th></span></q></dt></tr></i><div id='ckiua'><tfoot id='ckiua'></tfoot><dl id='ckiua'><fieldset id='ckiua'></fieldset></dl></div>
    2. 如何在 PHP 中实现 cron?

      时间:2023-08-17

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

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

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

                <bdo id='V7RNR'></bdo><ul id='V7RNR'></ul>
              • 本文介绍了如何在 PHP 中实现 cron?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我使用网络托管 startlogic.com.我向一名员工询问了有关 cron 的问题.他们告诉我,他们的控制面板中只有一个名为计划作业"的功能.我可以在哪里手动放置作业.但我需要从我的 Web 应用程序中执行此操作.例如,当我按下按钮时,我会在 1 个月后收到电子邮件通知.如何使用 PHP 实现这一点?

                I use a web-hosting startlogic.com. I asked an employee about cron. They told me that they only have a feature in the control panel called "Schedule jobs" where I can manually put the job. But I need to do this from my web application. For example, when I push a button, I will receive an email notification after 1 month. How to implement this using PHP?

                推荐答案

                1. 制作一个名为 cron.php 的 PHP 脚本(如果可能,请在您的 Web 根目录之外).

                1. Make a PHP script called cron.php (outside of your web root if possible).

                将此设置为在计划作业"下定期运行

                Set this to run regularly under "Schedule Jobs"

                每次运行 cron.php 时,它都会检查作业数据库以查看是否有任何到期.

                Every time cron.php runs, it checks a database of jobs to see if any are due yet.

                如果有任何到期,它们就会运行.

                If any are due, they are run.

                一旦运行,它们就会被标记为这样.

                Once run, they are marked as such.

                要将新工作添加到列表中,只需在数据库中添加一个包含工作详细信息和截止日期的新行.

                To add new jobs to the list, just add a new row to the database with the details of the job and the due date.

                这篇关于如何在 PHP 中实现 cron?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:Cron 作业和文件夹权限 - 权限被拒绝 下一篇:cron 如何根据日期输出到新的日志文件?

                相关文章

                  <tfoot id='XNDyG'></tfoot>

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

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