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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Running a report from the command line....
Pages: [1]

Author Topic: Running a report from the command line....  (Read 381 times)

TheEdge

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 3.3.4
  • MySQL version: 5.6.17
  • PHP version: 5.4.32
Running a report from the command line....
September 23, 2014, 04:21:54 am
Hi,

I have created a report and want to schedule it to run once a month. However this does not seem possible with the built in scheduler. So my next option is to run the report from an external cron. In the attached is my job. When I run it from the web interface it runs fine with no issues and the emails arrove as I expect. However when I run it with curl (see red text at bottom of image) I:

  • Don't get any error message
  • There is nothing in the CiviCRM log for the job showing the CURL run (only the web ones previously run)
  • Naturally the emails for the report do not arrive

So my questions are:

1) Do I have the correct syntax to run the report?
2) Having triple checked the site key and username/password (the overall invocation of CiviCRM is working) if they are not correct (why?) do I get no error?
3) How do I work out what the issue is here with the cron job dying silently? I have read http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs#ManagingScheduledJobs-Command-lineSyntaxforRunningJobs and the two threads it mentions but there is nothing there for me.

As an aside some suggestions for future releases of CiviCRM:

1) In the cron job edit screen show the URL that could be used to invoke this particular job
2) Optionally fill the username/password/sitekey for 1) above assuming the user is logged in as a Super Admin and has the necessary priviledges. Saves having to hunt through API etc

Hoping someone can shed some light on my questions.

TheEdge

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 3.3.4
  • MySQL version: 5.6.17
  • PHP version: 5.4.32
Re: Running a report from the command line....
September 25, 2014, 12:57:45 am
Bump?

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Running a report from the command line....
September 25, 2014, 08:10:38 am
Are the versions that display in your profile correct, Joomla 1.7.x and Civi 4.0.7?  Those are very old versions so if it is it may be tough to answer but that is the first crucial piece of information.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

TheEdge

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 3.3.4
  • MySQL version: 5.6.17
  • PHP version: 5.4.32
Re: Running a report from the command line....
September 27, 2014, 06:04:29 pm
Hi,

You are right those versions are not what I am running. I am running J! 3.3.4 and CiviCRM 4.5.0 which are the latest versions of both.


Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Running a report from the command line....
September 27, 2014, 06:50:17 pm
Have you tried running the CURL for all jobs instead of just the specific one?  That would be the same URL except without the instanceid and job strings at the end.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Running a report from the command line....

This forum was archived on 2017-11-26.