CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • what's the deal with UpdateMembershipRecord.php?
Pages: [1]

Author Topic: what's the deal with UpdateMembershipRecord.php?  (Read 1375 times)

tmcnulty1982

  • Guest
what's the deal with UpdateMembershipRecord.php?
November 06, 2008, 09:13:15 am
First of all, this is the second script (that I know of, after civimail) that I need to run via cron with a username and password for every CiviCRM instance that I manage.  Are there others?  Drupal has cron hooks, why not use them?

Second, why do I need to put my FROM address inside this PHP script?  Why do I even have to edit any PHP to set this up?  There's already a from address configured through the web interface, and having to type it in this PHP file means I either have to (a) copy sites/all/civicrm to sites/*/civicrm or (b) make a copy of UpdateMembershipRecord.php for every CiviCRM site that I run.  For something as simple as updating membership status, this is way overkill.  Am I missing something?

Thanks
Tobias

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: what's the deal with UpdateMembershipRecord.php?
November 06, 2008, 02:17:48 pm
Quote
Are there others?
No others that need to be run by cron. There is a batch geocode script that can be run once after import (if you're using mapping). Thereafter the system will update geocodes.

Quote
Drupal has cron hooks, why not use them?
1) We're not all using Drupal. 2) We're not all using the membership update script. 3) Flexibility.

Quote
why do I need to put my FROM address inside this PHP script?
Because you can use the script to send reminder emails for membership types, if you want. A from address is required.

Quote
There's already a from address configured through the web interface, and having to type it in this PHP file means I either have to (a) copy sites/all/civicrm to sites/*/civicrm or (b) make a copy of UpdateMembershipRecord.php for every CiviCRM site that I run.
Since the script is not managed through the interface, you would not have the ability to select your preferred FROM address. Maybe at some point it will be handled through the interface. For now, it's handled in the script.

Quote
For something as simple as updating membership status, this is way overkill.
You're complaining because you have to type an email address in the script once, per site?

Maybe it's just me, but that seems like a pretty pathetic complaint. If you wanted, you could always:
1) Modify the application to include control of the script through the interface, and come up with a way to automate the script without using a cronjob.
2) Create a CRM/membership application from scratch.
3) Pour a glass of whine to have with your cheese.

support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

tmcnulty1982

  • Guest
Re: what's the deal with UpdateMembershipRecord.php?
November 07, 2008, 11:52:54 am
More automation is almost always a good thing, and I'm sorry that sounds pathetic to you.  Of course I could automate the creation and execution of the scripts in question, but the long term solution would obviously be inclusion in CiviCRM itself.

My concern here is that these cron scripts (and especially UpdateMembershipRecord.php) preclude one from having a purely generic installation capable of hosting multiple independent Drupal + CiviCRM setups that differ only with respect to the contents of their databases.  So, your first suggestion sounds like a good idea to me; I just wanted to make sure this hasn't been implemented already and get a sense of the scale of the problem.  Thanks for your answers in the regard.

Would it be problematic to leverage Drupal's cron hooks for Drupal installations, leaving Joomla users to run their own cronjobs?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: what's the deal with UpdateMembershipRecord.php?
November 07, 2008, 11:58:58 am
Quote from: tmcnulty1982 on November 07, 2008, 11:52:54 am
Would it be problematic to leverage Drupal's cron hooks for Drupal installations, leaving Joomla users to run their own cronjobs?

Should not be problematic. Please submit a patch to do the needful. I suspect quite a few folks using civicrm with drupal will find it useful

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • what's the deal with UpdateMembershipRecord.php?

This forum was archived on 2017-11-26.