Cron¶
Loveshack schedules subscriber digest processing through WP-Cron using the hook:
The processor runs every ten minutes.
Why you need real cron¶
WP-Cron is not a scheduler — it is a queue that gets drained when someone visits the site. On a low-traffic site that means digests go out late or not at all, and on a high-traffic site it means the work happens inside a visitor's page load.
For production, disable visitor-triggered WP-Cron and drive it from a real cron job.
Setup¶
Add this to wp-config.php:
Then add a cron entry. The WP-CLI form is recommended:
Or, if WP-CLI is not available, use the HTTP form:
Do not skip the constant
Adding a cron job without setting DISABLE_WP_CRON leaves both paths active.
They will not duplicate emails, but you lose the predictable timing that was
the point of adding cron.
Bedrock¶
On Bedrock installs, run the WP-CLI command from the project root, not from
web/, so wp can load the site configuration:
Verifying¶
Check that the event is scheduled:
Run it once by hand:
If the hook is missing entirely, the theme was probably activated before the scheduling module loaded — deactivate and reactivate the theme to reschedule it.