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:
I started by installing the Automatic Cron Control plugin from GitHub. I installed the plugin from Automatic Cron Control
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 );
- 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
- 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