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

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

      2. 是否有任何 Cron 工作替代?

        Are There Any Cron Jobs Alternative?(是否有任何 Cron 工作替代?)

          • <small id='5SICx'></small><noframes id='5SICx'>

              <tfoot id='5SICx'></tfoot>
                <tbody id='5SICx'></tbody>
                <i id='5SICx'><tr id='5SICx'><dt id='5SICx'><q id='5SICx'><span id='5SICx'><b id='5SICx'><form id='5SICx'><ins id='5SICx'></ins><ul id='5SICx'></ul><sub id='5SICx'></sub></form><legend id='5SICx'></legend><bdo id='5SICx'><pre id='5SICx'><center id='5SICx'></center></pre></bdo></b><th id='5SICx'></th></span></q></dt></tr></i><div id='5SICx'><tfoot id='5SICx'></tfoot><dl id='5SICx'><fieldset id='5SICx'></fieldset></dl></div>
                <legend id='5SICx'><style id='5SICx'><dir id='5SICx'><q id='5SICx'></q></dir></style></legend>
                • <bdo id='5SICx'></bdo><ul id='5SICx'></ul>
                  本文介绍了是否有任何 Cron 工作替代?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的服务器上的 Cron 作业已关闭,服务器管理员不接受打开它.因为,cron 作业会减慢服务器等速度.所以,我需要一个替代方案.

                  Cron Jobs are closed on my server and server admin doesn't accept open it. Because , cron jobs slowing server etc. So, i need an alternative.

                  我必须每 2 分钟运行一次 php 文件 (cron.php).

                  I have to run a php file (cron.php) every 2 minutes.

                  那么,我该怎么做?

                  推荐答案

                  虽然这个问题是很久以前发布的,但我也遇到了同样的问题但是找到了解决方案(基于 Kissaki 的回答,谢谢!)我想我会把它贴在这里供任何仍在寻找可能解决方案的人使用.

                  Even though the question was posted a while ago, I just had the same problem but found a solution (based on Kissaki's answer, thanks!) and thought I'd post it here for anyone still looking for a possible solution.

                  先决条件:

                  • SSH 访问
                  • Python

                  代码(python):

                  from subprocess import call
                  import time
                  while True:
                      call(["php","cron.php"])
                      time.sleep(120)
                  

                  这篇关于是否有任何 Cron 工作替代?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Is PHP or PHP based web framework stateful or stateless?(PHP 或基于 PHP 的 Web 框架是有状态的还是无状态的?)
                  How to parse django style template tags(如何解析 django 样式模板标签)
                  What is a good setup for editing PHP in Emacs?(在 Emacs 中编辑 PHP 的好设置是什么?)
                  How to check whether specified PID is currently running without invoking ps from PHP?(如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?)
                  What#39;s the difference between escapeshellarg and escapeshellcmd?(escapeshellarg 和escapeshellcmd 有什么区别?)
                  php in background exec() function(php 后台 exec() 函数)

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

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

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

                            <bdo id='GW7cB'></bdo><ul id='GW7cB'></ul>
                            <legend id='GW7cB'><style id='GW7cB'><dir id='GW7cB'><q id='GW7cB'></q></dir></style></legend>
                              <tbody id='GW7cB'></tbody>