diff --git a/Civi/Api4/Action/ContactCategory/Sync.php b/Civi/Api4/Action/ContactCategory/Sync.php index 77bcd01..8fdee0f 100644 --- a/Civi/Api4/Action/ContactCategory/Sync.php +++ b/Civi/Api4/Action/ContactCategory/Sync.php @@ -161,8 +161,9 @@ class Sync extends \Civi\Api4\Generic\AbstractAction { $summary['memory_use'] = @round($_ / pow(1024, ($i = floor(log($_, 1024)))), 2) . ' ' . ['b', 'kb', 'mb', 'gb', 'tb', 'pb'][$i]; $result->exchangeArray($summary); - // Limit to running every 6 hours. - $settings['updateAfter'] = time() + 60 * 60 * 6; + // Limit to running every 24 hours; we actually want it to be stable within one day. + // Schedule for 3am to avoid busy times and DST. + $settings['updateAfter'] = strtotime('tomorrow + 180 minutes'); Setting::set(FALSE) ->addValue('contact_categories', $settings) ->execute();