Answers.Body: <p>See the third post here by Deepak.  </p>
  
  <p><a href="http://forum.civicrm.org/index.php?topic=26491.0" rel="nofollow">http://forum.civicrm.org/index.php?topic=26491.0</a>  </p>
  
  <p>I havn't tried it but it looks like scheduled mass merges are possible  </p>
  
  <pre><code>Process batch merge (Daily)
  API Entity: Job
  API Action: process_batch_merge
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-28T09:21:40.913Z
Answers.Text: This is a related question and may come in handy..
  http://civicrm.stackexchange.com/questions/2567/is-there-any-documentation-for-safe-and-aggressive-merge-modes/2571#2571
Answers.UserDisplayName: RocXa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-20T22:45:13.623Z
Answers.LastActivityDate: 2015-05-20T22:45:13.623Z
Answers.UserDisplayName: RocXa
Body: <p>It is my understanding that unsupervised dedupe rules take effect when one attempts to create a <em>new</em> contact, and they can also be run manually like any other rule. Can unsupervised deduplication be made to happen to <em>existing</em> contacts in the <em>background</em> (eg from cron)?</p>
  
  <p>Edit: Or indeed, in the foreground but still basically automatic in terms of 'start it and wait for it to finish'?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-06T07:32:27.697Z
Comments.Text: You mean like what you do with running the automatic batch dedupe?
Comments.UserDisplayName: Xavier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-06T10:27:42.367Z
Comments.Text: Aha, good idea. Maybe I'm being dumb.
Comments.UserDisplayName: DaveFF
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-06T10:29:05.520Z
Comments.Text: Of course, another thing I've found now is that I can't add custom fields that are defined only for contact subtypes as dedupe criteria, but I can add custom fields that are defined for all contacts or for the relevant contact type.
Comments.UserDisplayName: DaveFF
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-06T16:15:52.977Z
Comments.Text: Following my comment above, such conditions can be added in the dupeQuery hook: https://gist.github.com/futurefirst/a4e1d4346fa99b50cb8e
Comments.UserDisplayName: DaveFF
Tags: <contacts><cron-job><duplicate-contacts>
Title: Unsupervised dedupe rules in the background?
ThreadText: # Unsupervised dedupe rules in the background?
  
  (Asked by: username_0 on 2015-05-05)
  
  It is my understanding that unsupervised dedupe rules take effect when one attempts to create a *new* contact, and they can also be run manually like any other rule. Can unsupervised deduplication be made to happen to *existing* contacts in the *background* (eg from cron)?
  
  Edit: Or indeed, in the foreground but still basically automatic in terms of 'start it and wait for it to finish'?
  
  **Tags:** contacts, cron-job, duplicate-contacts
  
  > **Comments:**
  > **username_1**: You mean like what you do with running the automatic batch dedupe?  
  > **username_0**: Aha, good idea. Maybe I'm being dumb.  
  > **username_0**: Of course, another thing I've found now is that I can't add custom fields that are defined only for contact subtypes as dedupe criteria, but I can add custom fields that are defined for all contacts or for the relevant contact type.  
  > **username_0**: Following my comment above, such conditions can be added in the dupeQuery hook: https://gist.github.com/futurefirst/a4e1d4346fa99b50cb8e  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-05-20. Score: 2 | Accepted answer
  
  See the third post here by Deepak.  
  http://forum.civicrm.org/index.php?topic=26491.0 
  I havn't tried it but it looks like scheduled mass merges are possible  
  Process batch merge (Daily)
  API Entity: Job
  API Action: process_batch_merge
  
  > **Comments:**
  > **username_2**: This is a related question and may come in handy.. http://civicrm.stackexchange.com/questions/2567/is-there-any-documentation-for-safe-and-aggressive-merge-modes/2571#2571  
  
  ---
  
  