[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Admin warning about scheduler not running when no active schedulers exist
"Elifeleti Mukisa Dan \(@Danelif\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68e7625781e7b_2ce065099582@gitlab-sidekiq-low-urgency-cpu-bound-v2-787f5f698-p8fcl.mail> |
Elifeleti Mukisa Dan pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
d10a18d9 by Elifeleti Mukisa Dan at 2025-10-09T07:13:06+00:00
[FIX] Admin warning about scheduler not running when no active schedulers exist
---
* [FIX] Admin warning about scheduler not running when no active schedulers exist
See merge request tikiwiki/tiki!8736
- - - - -
1 changed file:
- lib/core/Scheduler/Utils.php
Changes:
=====================================
lib/core/Scheduler/Utils.php
=====================================
@@ -86,13 +86,25 @@ class Scheduler_Utils
}
/**
- * Check if schedulers are configured
+ * Check if schedulers are configured and running properly
*
- * @return bool
+ * Returns false only if:
+ * - There are active schedulers configured, AND
+ * - The scheduler has not run recently (based on scheduler_last_run_warning_minutes)
+ *
+ * @return bool true if no warning should be shown, false if warning should be shown
*/
public function isSchedulerRunConfigured()
{
$tikilib = TikiLib::lib('tiki');
+ $schedLib = TikiLib::lib('scheduler');
+
+ // Check if there are any active schedulers first
+ // If no active schedulers exist, don't show the warning
+ $activeSchedulers = $schedLib->get_scheduler(null, 'active');
+ if (empty($activeSchedulers)) {
+ return true;
+ }
$lastRunWarningMinutes = $tikilib->get_preference('scheduler_last_run_warning_minutes', 60);
$lastRunTimestamp = $tikilib->get_preference('scheduler_last_run_timestamp');
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d10a18d9f1442873a2ed538aee01df1620485d4e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d10a18d9f1442873a2ed538aee01df1620485d4e
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs