From: Armaghan S. <sa...@le...> - 2008-06-07 07:48:01
|
On Wed, Jun 4, 2008 at 8:30 AM, David J <ja...@in...> wrote: > Duncan > I've been thinking of preparing some end-of-month reports to > run automagically by cronjob, and email to > owner/manager/administrator. > Is it possible to somehow get any existing SQL-L reports > sent this way, or will my custom perl script need to dig > (and format) its own data directly from the SQL-L database ? > We've previously used some perl scripts to insert data into > SQL-L, but can't see any way to capture SQL-L output for -> > email. Here is a quick and dirty way I use to email reports. This method uses API call to generate the required report in a temporary file and than uses mutt to email it. You can all this in a shell script file and run through cron. [code] #!/usr/local/bin/bash ./ar.pl "path=bin/mozilla&login=armaghan&password=armaghan&action=continue&nextsub=transactions&summarY=1&open=Y&l_amount=Y&l_description=Y&l_invnumber=Y&l_name=Y&l_paid=Y&l_transdate=Y&vc=customer&ARAP=AR&outstanding=1" > /tmp/outstanding.html mutt -a /tmp/outstanding.html -s 'Outstanding report' sa...@le... < /dev/null [/code] Regards -- * Purpose-built SQL-Ledger Hosting. Free trial. * SQL-Ledger VMware Appliance. Free download. http://www.ledger123.com/ -- |