Answers.Body: <p>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 <a href="https://civicrm.stackexchange.com/questions/31303/how-do-the-rebuild-smart-group-cache-scheduled-job-and-the-smart-group-cache-tim">SE question</a> and this <a href="https://civicrm.org/blog/eileen/478-group-contact-cache-deadlocks-improvement" rel="nofollow noreferrer">blog post</a> to understand CiviCRM's smart group behaviour a bit better.</p>
  <p>A good approach could be to:</p>
  <ol>
  <li>Set smart_group_cache_refresh_mode=deterministic</li>
  <li>Set the smart group cache time in CiviCRM to 24 hours</li>
  <li>Configure the cron job to update the smart groups once per night</li>
  </ol>
  <p>Make sure to test your settings if you want to rely on your groups.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-19T19:06:39.730Z
Answers.Text: So #3  is setting up 'job.group_cache_flush' cron job daily?
Answers.UserDisplayName: Andy Burns
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-22T06:37:47.357Z
Answers.Text: 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.
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-18T14:33:02.077Z
Answers.LastActivityDate: 2020-06-18T14:33:02.077Z
Answers.UserDisplayName: Fabian
Answers.Body: <p>I think you're looking for <code>Rebuild Smart Group</code> schedule job enabled at <code>civicrm/admin/job?reset=1</code>?</p>
  <p><a href="https://i.sstatic.net/UXi5G.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UXi5G.png" alt="enter image description here" /></a></p>
  <p>Click on Edit and change the frequency to &quot;Daily&quot;. Though, for exact time, you might need to write custom line in the cron file.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-18T11:45:27.290Z
Answers.LastActivityDate: 2020-06-18T11:45:27.290Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>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?</p>
  <p>Thanks in advance</p>
  
Tags: <smartgroups>
Title: Changing Smart Group Update Frequency
ThreadText: # Changing Smart Group Update Frequency
  
  (Asked by: username_0 on 2020-06-18)
  
  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
  
  **Tags:** smartgroups
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-06-18. Score: 1
  
  Afaik, updating of smart groups can be triggered both by the cron job as described username_3 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](https://civicrm.stackexchange.com/questions/31303/how-do-the-rebuild-smart-group-cache-scheduled-job-and-the-smart-group-cache-tim) and this [blog post](https://civicrm.org/blog/eileen/478-group-contact-cache-deadlocks-improvement) 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.
  
  > **Comments:**
  > **username_2**: So #3  is setting up 'job.group_cache_flush' cron job daily?  
  > **username_1**: 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.  
  
  ---
  
  ### Answer by username_3 on 2020-06-18. Score: 1
  
  I think you're looking for `Rebuild Smart Group` schedule job enabled at `civicrm/admin/job?reset=1`?
  
  [![enter image description here](https://i.sstatic.net/UXi5G.png)](https://i.sstatic.net/UXi5G.png)
  
  Click on Edit and change the frequency to "Daily". Though, for exact time, you might need to write custom line in the cron file.
  
  
  ---
  
  