Server cron will not trigger wp-cron, none of the advice and code snippets available actually work

admin2025-01-07  5

Goal:

The goal is to ensuring that each task runs concurrently without being queued or delayed. I have several cron jobs set up on my site, each scheduled to run every minute. However, I would like to ensure that all of these cron jobs can execute at the same time without any delays or performance issues.

Issue:

My parallel cron jobs aren’t working.

  • All the jobs have been successfully created in my database, but they stop executing as they should.

  • When calling the REST API manually, it works as well.

What i followed:

  1. I started by installing the Automatic Cron Control plugin from GitHub. I installed the plugin from Automatic Cron Control

  2. After the plugin was installed, I configured the settings to disable the default WP Cron and added the secret key to wp-config.php file:

define( 'WP_CRON_CONTROL_SECRET', '85bf6fefd2bd1825023f8b5e5c98e112' );
define( 'DISABLE_WP_CRON', true );
  1. Next, I set up a cron job on my server to trigger WordPress cron jobs at a specified interval (e.g., every minute). and there are 2 crons running on the server :
  • This cron job will trigger Automatic Cron Control plugin's main root file
 * * * * * php /home/public_html/domain/wp-content/plugins/cron-control/cron-control.php 
  • This cron job calls the wp-cron.php file on my WordPress site
* * * * * wget -q -O - ".php?doing_wp_cron&85bf6fefd2bd1825023f8b5e5c98e112" > /dev/null 2>&1
  1. Once the cron job was set up, I manually tested the endpoint to ensure that the cron jobs were being triggered correctly:
.php?doing_wp_cron&85bf6fefd2bd1825023f8b5e5c98e112
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736265268a1032.html

最新回复(0)