2

In the Areas extension (https://lab.civicrm.org/extensions/org.civicoop.areas) an administrator can define areas such as West Coast and a contact living in a city in West Coast is linked to the area West Coast.

Every time an address is updated the linked areas of that contact is also updated.

However we need to have a solution for the use case when an administrator adds or changes an existing Area.

My idea is that a cron job runs every day and queries the contact table and checks contact for contact the linked areas. This would probably work fine a small database but I am worried that this job times out in a large database.

How would a solution look like if the database has for example 1.000.000 records?

3

If you run the schedulded job as a cron job and don't use the http-method for the setup you will not face a php runtime timeout. We did have no issues with schedulded jobs running multiple hours.

  • 1
    Thanks I used set_time_limit(0); at the beginning of the scheduled job code. – Jaap Jansma - CiviCooP May 22 '18 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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