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) »
  • CLI cronjobs
Pages: [1]

Author Topic: CLI cronjobs  (Read 1342 times)

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+
CLI cronjobs
September 12, 2011, 07:44:44 pm
just was in the process of updating cronjobs on a few sites for 3.4.5.

it looks like the cli.php file has been drupalized -- it requires the CIVICRM_CONFDIR constant, which I thought was only used for drupal multisite installations (so why are we requiring it -- multisite is probably the exception, not the rule in most drupal implementations).

my main concern is that my joomla sites previously running crons over CLI can no longer do it .
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

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: CLI cronjobs
September 12, 2011, 07:55:33 pm
more on the above...

so its fine if we want to require the -s option -- though i think it makes more sense for both joomla and drupal users if that is optional, and would only need to be present if you're using multisite.

but down in the setEnv() function, we set the script filename based on the $civicrm_root global, then we check to see if _CONFDIR is set, and immediately reset the value or die (if CONFDIR is not set). bad logic. i should overwrite with CONFDIR if present, and otherwise proceed with the original path definition.

also -- the use of the CONFDIR constant looks incorrect. CONFDIR is suppose to define the sites folder if its in a non-standard location, which means we're duplicating that folder when building the script filename. (i.e. .../sites/sites/all/modules...).

I think that cli.php file is just generally busted.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

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: CLI cronjobs
September 12, 2011, 08:24:07 pm
patch filed here: http://issues.civicrm.org/jira/browse/CRM-8851
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CLI cronjobs
September 12, 2011, 10:55:17 pm
Hi,

Can you check the trunk? jamie did patch things.

Not sure how far we got, but in the code sprint they were some agreement to standardise the various cli scripts param, and simplify (eg no need to put the password if run from the cli).  Can you check and generate a patch for trunk too?

As for the 3.4, I'm testing with the non standard config and let you know in the issue. Thx for fixing for joomla & standard installs!

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: CLI cronjobs
September 13, 2011, 05:45:39 am
looks like the trunk version has been completely reworked, and looks like the specific issue that prevented joomla users from running the script has been addressed.

i'll try to make a point of testing the trunk version soon.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • CLI cronjobs

This forum was archived on 2017-11-26.