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

      <bdo id='lWHLn'></bdo><ul id='lWHLn'></ul>
  1. <legend id='lWHLn'><style id='lWHLn'><dir id='lWHLn'><q id='lWHLn'></q></dir></style></legend>
  2. <tfoot id='lWHLn'></tfoot>

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

    1. 仅在特定时间每分钟运行一次 cron 作业?

      Run a cron job every minute only on specific hours?(仅在特定时间每分钟运行一次 cron 作业?)

      <tfoot id='P0u9b'></tfoot>

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

            <bdo id='P0u9b'></bdo><ul id='P0u9b'></ul>
          • <small id='P0u9b'></small><noframes id='P0u9b'>

              <tbody id='P0u9b'></tbody>
            <legend id='P0u9b'><style id='P0u9b'><dir id='P0u9b'><q id='P0u9b'></q></dir></style></legend>

              • 本文介绍了仅在特定时间每分钟运行一次 cron 作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                您如何仅在特定时间每分钟运行一次 cron 作业?像这样:

                How do you run a cron job every minute only on specific hours? Like so:

                它只会在上午 11 点到中午 12 点、下午 4 点到下午 5 点和晚上 9 点到晚上 10 点每分钟检查一次

                It will only check every minute from 11AM to 12AM, 4PM to 5PM and 9PM to 10PM

                这对我来说似乎很复杂,我不知道从哪里开始.

                It seems to be complicated to me I don't know where to start.

                推荐答案

                正确的解决方案:

                * 11,16,21 * * *
                

                因为如果您使用以前的解决方案:

                Because if you use previous solution:

                0-59 11-12,16-17,21-22 * * * *
                

                作业将在 12:40 或 17:59 开始.不在上午 11 点到 12 点、下午 4 点到 5 点和晚上 9 点到 10 点的范围内.

                Job will start at 12:40 or 17:59. It is not in range from 11AM to 12AM, 4PM to 5PM and 9PM to 10PM.

                更新:

                传统(继承自 Unix)cron 格式由五个由空格分隔的字段组成:

                Traditional (inherited from Unix) cron format consists of five fields separated by white spaces:

                *    *    *    *    *  command to be executed
                ┬    ┬    ┬    ┬    ┬
                │    │    │    │    │
                │    │    │    │    │
                │    │    │    │    └───── day of week (0 - 6) (0 is Sunday, or use names)
                │    │    │    └────────── month (1 - 12)
                │    │    └─────────────── day of month (1 - 31)
                │    └──────────────────── hour (0 - 23)
                └───────────────────────── min (0 - 59)
                

                nnCron 可以使用传统和增强"版本的 cron 格式,它有一个额外的(第 6 个)字段:年份.

                nnCron can use both traditional and "enhanced" version of cron format, which has an additional (6th) field: Year.

                这篇关于仅在特定时间每分钟运行一次 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() 函数)
                  <i id='fQ05O'><tr id='fQ05O'><dt id='fQ05O'><q id='fQ05O'><span id='fQ05O'><b id='fQ05O'><form id='fQ05O'><ins id='fQ05O'></ins><ul id='fQ05O'></ul><sub id='fQ05O'></sub></form><legend id='fQ05O'></legend><bdo id='fQ05O'><pre id='fQ05O'><center id='fQ05O'></center></pre></bdo></b><th id='fQ05O'></th></span></q></dt></tr></i><div id='fQ05O'><tfoot id='fQ05O'></tfoot><dl id='fQ05O'><fieldset id='fQ05O'></fieldset></dl></div>
                  <tfoot id='fQ05O'></tfoot>

                      <tbody id='fQ05O'></tbody>
                  • <small id='fQ05O'></small><noframes id='fQ05O'>

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

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