1

I have a number of cases where I need to run a cron job to use a custom search and a template. It should be simple to schedule a mailing to automatically run on some basis.

I have 2 current examples, Once a month I need to send a summary to a contact listing the status of their constituents. I have a group listing all the recipients of a report. For each person a template is called and from the use of tokens generates and sends the report.

In another case I have a search which identifies the payments from the previous day. The cron runs and based on a template sends acknowledgements.

I would think there should be an easy way of setting up a cron which calls a search and a template. Unfortunately I don't see how to easily specify the two parts, If a current module exists where I can just name the search and the template that would solve my problem. This would be like automatically launching a mailing daily from a cron.

1

It doesn't exist for search, but it does for reports. Could you use a report instead of the search?

| improve this answer | |
  • That would explain why I was unable to find a solution. – user469 Jun 14 '15 at 17:21
  • I don't want to maintain a report for each grouping. My thought is to build a smart group with the criteria listing the people who get the reports on a monthly basis. When the template runs the tokens understand who the report is being sent to and craft it based on each individual. We use this process to do our billing. The new requirement is the need to run the process on a implement schedule. instead having the office staff remember to run the process. I am looking to find a way for crons to cause the online function to run in the background. – user469 Jun 14 '15 at 17:39
  • What you describe would be cool, but it'll need some custom coding--both on determining the recipients and figuring out the appropriate settings for the report. Xavier's right that you should start with a report, though. – Andrew Hunt Jun 15 '15 at 14:34
  • I need 16 different reports, each report is sent to 2 or 3 people. Setting up and maintaining the distributions for each report is a big job. People move and you need to keep up with the changes. is a big job. My thought is to have a smart group know who gets which version of the report and the template using tokens generates the correct report and sends it. I agree implementing the function requires work. Is there an existing Civi requirement or do I need to build one. – user469 Jun 15 '15 at 19:54

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.