// 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()) {
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');
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');