Repository navigation
Upd. Cron. Limiting the launch of Cron tasks - #758
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Excluding ordinary GET requests without a recurring background wakeup can delay scheduled security work for hours.
1 open issue
What changed in this PR
This PR limits the security plugin’s cron workload to reduce its impact on visitor requests.
Changes:
- Restricts cron ticks to POST and WordPress cron requests, excluding remote calls.
- Runs one task per tick, prioritizing the most overdue.
- Preserves skipped tasks’ schedules for later ticks.
| File | Description |
|---|---|
| security-malware-firewall.php | Applies request gating before running cron. |
| lib/CleantalkSP/SpbctWP/Cron.php | Defines eligible requests and the one-task limit. |
| lib/CleantalkSP/Common/Cron.php | Limits and orders due tasks while preserving deferred work. |
Review effort: Balanced
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Cron recovery can stall, scanner errors can terminate background ticks, and wakeup authentication and concurrency handling need correction.
5 open issues
Authenticate before consuming the wakeup cooldown · New Add local cron recovery when loopback dispatch fails · New Allow key-independent execution of maintenance tasks · New Atomically claim wakeups to prevent parallel dispatches · New Return scanner errors to cron instead of terminating execution · New
1 resolved since last review
Review effort: Balanced
Glomberg
requested changes
Oct 24, 2026
svedge
approved these changes
Oct 26, 2026
Glomberg
approved these changes
Oct 27, 2026
…irewall into fix_init_cron_av
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


https://app.doboard.com/1/task/58453