Revision [2106]

This is an old revision of HowtoSalesreportAutoRun made by PhilDaintree on 2011-08-18 03:29:17.

 

How To Make Sales Reports Run Automatically


There are a couple of ways actually:

1. Make a copy of the script MailSalesReport.php sale call it MailMySalesReport.php - the top part of this script has some user modifiable parameters - which are documented in the file as below:

php
The intention is that this script is called from cron at intervals defined with a command like:

/usr/bin/wget http://localhost/web-erp/MailSalesReport.php

The configuration of this script requires the id of the sales analysis report to send
and an array of the receipients */

$_GET['ReportID'] = 2;
/usr/bin/wget http://localhost/web-erp/MailSalesReport.php

$DatabaseName = 'weberp';
$Recipients = array('"Root" <root@localhost>','"' . _('someone else') . '" <someoneelese@sowhere.com>');



Now you need to set up a scheduled job using either cron if your web-host is a linux or unix machine (as 70+% are) or windows scheduler. To call the page you need to use the wget utlity program - the command to put into cron using your web-hosts cpanel or whatever utility they provide for scheduling jobs is:


/usr/bin/wget http://localhost/web-erp/MailMySalesReport.php

Method 2:


Use the report_runner.php script
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki