I'd like to have a large number of smart groups but don't want to bog down the site when employees are using it. Is there a way to set up a smart group so that it will only update itself at a particular time of day, say only out of business hours sort of thing?

Thanks in advance

2 Answers 2


I think you're looking for Rebuild Smart Group schedule job enabled at civicrm/admin/job?reset=1?

enter image description here

Click on Edit and change the frequency to "Daily". Though, for exact time, you might need to write custom line in the cron file.


Afaik, updating of smart groups can be triggered both by the cron job as described jitendra but also by many actions in CiviCRM. A large contact base and/or complex smart groups may lead to performance and deadlock problems and you also need to consider flushing the group cache. I would recommend to read this SE question and this blog post to understand CiviCRM's smart group behaviour a bit better.

A good approach could be to:

  1. Set smart_group_cache_refresh_mode=deterministic
  2. Set the smart group cache time in CiviCRM to 24 hours
  3. Configure the cron job to update the smart groups once per night

Make sure to test your settings if you want to rely on your groups.

  • So #3 is setting up 'job.group_cache_flush' cron job daily?
    – Andy Burns
    Jun 19, 2020 at 19:06
  • I meant the cron job to rebuild the Smart Group Cache. It could probably not hurt to set up the "flush cache job" (as long as it runs before the rebuild job) but it would probably not be necessary if "smart_group_cache_refresh_mode" is set to deterministic.
    – Fabian
    Jun 22, 2020 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.