首页 > 解决方案 > WP CRON 作业像现在一样在 AWS 上无限期地运行

问题描述

最近我们在 WordPress 中的 CRON 作业出现问题,时区不匹配,因此我们更改了服务器的时区。结果发生的事情是,大多数 CRON 的 next_run_relative 都设置为现在运行,并且它们继续无限期地运行。

除了重启实例(因为它附加到负载均衡器实例)之外,还有其他方法可以解决这个问题吗?下面是一个例子


+-------------------------------------------------+---------------------+----------------------+---------------+
| hook                                            | next_run_gmt        | next_run_relative    | recurrence    |
+-------------------------------------------------+---------------------+----------------------+---------------+
       |
| woocommerce_cleanup_logs                        | 2020-11-09 15:31:12 | now                  | 1 day         |
| woocommerce_cleanup_sessions                    | 2020-11-09 18:31:12 | now                  | 12 hours      |
| woocommerce_scheduled_sales                     | 2020-11-09 19:00:00 | now                  | 1 day         |

标签: phpwordpressamazon-web-servicesamazon-ec2cron

解决方案


推荐阅读