PHP - Cron作业在特定的日期和时间运行。

时间:2021-05-08 23:56:27

How to identify that cron job will run on specific Date&Time with help of cron expression Only

如何识别cron作业只在cron表达式的帮助下在特定的日期和时间运行

4 个解决方案

#1


11  

*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0 - 6) (Sunday=0)
|     |     |   +------- month (1 - 12)
|     |     +--------- day of        month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

Replace the * with the values you need.

用您需要的值替换*。

#2


8  

Structure for cron job parameters

cron作业参数的结构

Minutes [0-59]
    |   Hours [0-23]
    |   |   Days [1-31]
    |   |   |   Months [1-12]
    |   |   |   |   Days of the Week [Numeric, 0-6]
    |   |   |   |   |
    *   *   *   *   * home/path/to/command/the_command.sh

#3


0  

If you use apache control panel, refer to it. usually it has a cron job section with good help and example

如果使用apache控制面板,请参考它。通常它有一个cron job部分,有很好的帮助和例子

#4


0  

If you want to start with the crontab time/date values and then see a list of future run-times try the cron sandbox at dataphyx.

如果您想从crontab时间/日期值开始,然后查看未来运行时间的列表,请尝试dataphyx上的cron沙箱。

#1


11  

*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0 - 6) (Sunday=0)
|     |     |   +------- month (1 - 12)
|     |     +--------- day of        month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

Replace the * with the values you need.

用您需要的值替换*。

#2


8  

Structure for cron job parameters

cron作业参数的结构

Minutes [0-59]
    |   Hours [0-23]
    |   |   Days [1-31]
    |   |   |   Months [1-12]
    |   |   |   |   Days of the Week [Numeric, 0-6]
    |   |   |   |   |
    *   *   *   *   * home/path/to/command/the_command.sh

#3


0  

If you use apache control panel, refer to it. usually it has a cron job section with good help and example

如果使用apache控制面板,请参考它。通常它有一个cron job部分,有很好的帮助和例子

#4


0  

If you want to start with the crontab time/date values and then see a list of future run-times try the cron sandbox at dataphyx.

如果您想从crontab时间/日期值开始,然后查看未来运行时间的列表,请尝试dataphyx上的cron沙箱。