-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop firing WP CRON when it's disabled #6282
Comments
Reproduce the issueYes Root causeAs mentioned in the issue, we force the cron to run once the RUCSS option is activated and wait for 90 seconds, this ajax request will be sent to backend to fire the CRON. Scope a solutionWe need to fix this from both sides (the js part and the php part) JS part:
We need to add a new key for
Then in JS here add new condition to check on this new attribute PHP Part:
#Effort |
Seems good to me :) |
Changed the Acceptance Criteria here. |
Co-authored-by: WordPressFan <[email protected]>
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
When the constant
DISABLE_WP_CRON
is true, we need to stop calling the method spawn_cron here:wp-rocket/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php
Line 616 in 06381b8
This was a suggestion from Kinsta not to fire the CRON because this may cause CPU issues.
To Reproduce
Steps to reproduce the behavior:
define( 'DISABLE_WP_CRON', true )
Expected behavior
CRON should not be called at all when this constant is set.
Additional context
Slack convos:
https://wp-media.slack.com/archives/CUT7FLHF1/p1700469134274159
https://wp-media.slack.com/archives/C056ZJMHG0P/p1700248478315299
Acceptance Criteria (for WP Media team use only)
The text was updated successfully, but these errors were encountered: