mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 09:48:05 +02:00
Update at 3am not every 6 hours
This commit is contained in:
parent
1d28eb4820
commit
d2a0670381
1 changed files with 3 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue