]> 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 8ede97c2e48783ef891a9b24240e46798a49a7a9..3ce5fb4605a4aa505ccf5a4df72eff5ca2e9d6b3 100644 (file)
@@ -72,9 +72,6 @@ class Cron
                // Call possible post update functions
                Worker::add(PRIORITY_LOW, 'PostUpdate');
 
-               // Repair entries in the database
-               Worker::add(PRIORITY_LOW, 'RepairDatabase');
-
                // Hourly cron calls
                if (DI::config()->get('system', 'last_cron_hourly', 0) + 3600 < time()) {
 
@@ -96,8 +93,8 @@ class Cron
                        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,9 +105,12 @@ 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_MEDIUM, 'DBClean');
+                       Worker::add(PRIORITY_LOW, 'ExpirePosts');
 
                        Worker::add(PRIORITY_LOW, 'ExpireConversations');