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) »
  • Email reports monthly
Pages: [1]

Author Topic: Email reports monthly  (Read 443 times)

quietone

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3.7
  • CMS version: Drupal
  • MySQL version: 14.14
  • PHP version: 5.3
Email reports monthly
December 19, 2013, 07:49:41 pm
Hi,

I'm new, first post.

I've done a fair bit of reading on managing jobs and cron but not sure how to set up sending 9 reports each month. I can successfully mail a report (to ConfigAndLog/mail) using the PHP cli method. Do I just write a script to run it on the day I want and use /etc/cron.d, or is there a better/preferred way?

And I can't mail a report using the Drush method. Anyone have a working example to share?

Thanks

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: Email reports monthly
December 20, 2013, 10:10:15 am

a. you should write a script to wrap the cli call to mail a report for a report instance (you can potentially use instanceID as a parameter to the script)

b. add a cron entry to specify the date/time you want to send the report

its a cli job, so you can use the instructions to invoke a cli command via drush:

http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs#ManagingScheduledJobs-Drushmethod

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) »
  • Email reports monthly

This forum was archived on 2017-11-26.