From 36f60b51d7a49fe18071f67770064cccf2cb439d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 2 May 2025 13:17:20 +0300 Subject: [PATCH] make digest sending a hourly cron job --- classes/RSSUtils.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/classes/RSSUtils.php b/classes/RSSUtils.php index 7c13dba63..67ee3709d 100644 --- a/classes/RSSUtils.php +++ b/classes/RSSUtils.php @@ -285,9 +285,6 @@ class RSSUtils { self::housekeeping_user($owner_uid); } - // Send feed digests by email if needed. - Digest::send_headlines_digests(); - return $nf; } @@ -1775,6 +1772,14 @@ class RSSUtils { return 0; } ); + + PluginHost::getInstance()->add_scheduled_task('send_headlines_digests', '@hourly', + function() { + Digest::send_headlines_digests(); + + return 0; + } + ); } static function housekeeping_common(): void {