]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Cron.php
Improve accuracy of User::getList with type = blocked
[friendica.git] / src / Worker / Cron.php
index 5e2a6a0695bb9b929fa8fe49a60234e34a956c97..3ce5fb4605a4aa505ccf5a4df72eff5ca2e9d6b3 100644 (file)
@@ -90,14 +90,11 @@ class Cron
                        // Clear cache entries
                        Worker::add(PRIORITY_LOW, 'ClearCache');
 
-                       // Repair entries in the database
-                       Worker::add(PRIORITY_LOW, 'RepairDatabase');
-
                        DI::config()->set('system', 'last_cron_hourly', time());
                }
 
-               // Daily cron calls
-               if (DI::config()->get('system', 'last_cron_daily', 0) + 86400 < time()) {
+               // Daily maintenance cron calls
+               if (Worker::isInMaintenanceWindow(true)) {
 
                        Worker::add(PRIORITY_LOW, 'UpdateContactBirthdays');
 
@@ -108,6 +105,9 @@ class Cron
 
                        Worker::add(PRIORITY_LOW, 'UpdateGServers');
 
+                       // Repair entries in the database
+                       Worker::add(PRIORITY_LOW, 'RepairDatabase');
+
                        Worker::add(PRIORITY_LOW, 'Expire');
 
                        Worker::add(PRIORITY_LOW, 'ExpirePosts');