From dba83a639c2cd6110da47a64362f6a5f21acfd7b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 May 2025 20:36:09 +0300 Subject: [PATCH] fix wrong config param being used & add a link to cron syntax we support --- classes/Config.php | 4 +++- classes/RSSUtils.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/Config.php b/classes/Config.php index 57878fb42..23aaecf6b 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -188,7 +188,9 @@ class Config { * key is a 32 byte hex string which may be generated using `update.php --gen-encryption-key` */ const ENCRYPTION_KEY = "ENCRYPTION_KEY"; - /** scheduled task to purge orphaned articles, value should be valid cron expression */ + /** scheduled task to purge orphaned articles, value should be valid cron expression + * @see https://github.com/dragonmantank/cron-expression/blob/master/README.md#cron-expressions + */ const SCHEDULE_PURGE_ORPHANS = "SCHEDULE_PURGE_ORPHANS"; /** scheduled task to expire disk cache, value should be valid cron expression */ diff --git a/classes/RSSUtils.php b/classes/RSSUtils.php index 5fc8ddcef..c0012afcb 100644 --- a/classes/RSSUtils.php +++ b/classes/RSSUtils.php @@ -1697,7 +1697,7 @@ class RSSUtils { } ); - $scheduler->add_scheduled_task('disk_cache_expire_all', Config::get(Config::SCHEDULE_PURGE_ORPHANS), + $scheduler->add_scheduled_task('disk_cache_expire_all', Config::get(Config::SCHEDULE_DISK_CACHE_EXPIRE_ALL), function() { $cache = DiskCache::instance(""); $cache->expire_all();