From: Pak R. <pak...@gm...> - 2014-05-23 02:09:04
|
Hi all: I'm facing some performance issues with my installation, mainly because of some batch processes using a lot of resources. Every morning we launch a custom script to optimize stock in every location, and do around 150 business checks and send emails to everyone concerned in the team, so the first one opening webERP every morning launches the script automatically (as the DB optimization fucntion does.) Used to work great but now it's taking too much time and shared resources at the hosting space. I would like to split it in several tasks launched by cron job, but problem is I have no idea how to write a webERP script that is able to be launched by cron. Does someone have a sample that could be used as a template? Many thanks! Regards, Ricard |
From: Marcos G. T. <ad...@gm...> - 2014-05-23 04:05:07
|
I guess you need to forget (in part) the webERP job scheme, because it was done with interactive task in mind. Perhaps the best way to do this labor is to create some scripts (in PHP, of course) those could be runned out of line, in some hours of the nigth using CLI. for example see: http://www.php.net/manual/en/features.commandline.usage.php Saludos desde Mérida, Yuc! 2014-05-22 21:08 GMT-05:00 Pak Ricard <pak...@gm...>: > Hi all: > > I'm facing some performance issues with my installation, mainly because of > some batch processes using a lot of resources. Every morning we launch a > custom script to optimize stock in every location, and do around 150 > business checks and send emails to everyone concerned in the team, so the > first one opening webERP every morning launches the script automatically > (as the DB optimization fucntion does.) > > Used to work great but now it's taking too much time and shared resources > at the hosting space. I would like to split it in several tasks launched by > cron job, but problem is I have no idea how to write a webERP script that > is able to be launched by cron. > > Does someone have a sample that could be used as a template? > > Many thanks! > > Regards, > Ricard > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > -- Ing Marcos R Garcia Trejo (52) 9991-513412 Laboratorio de Ingeniería y Procesos Costeros (LIPC) Unidad Académica Sisal, UNAM MGa...@ii... Tel 52 988 931 1000 |
From: Phil D. <ph...@lo...> - 2014-05-23 05:13:45
|
The sales analysis reports can be run from cron they use the allow anyone variable so no output should be produced that could be exposed. Then use wget i think there is an example in the manual -- Phil Daintree +64(0)275 567890 Skype: daintree On May 23, 2014 4:05:00 PM NZST, Marcos Garcia Trejo <ad...@gm...> wrote: >I guess you need to forget (in part) the webERP job scheme, because it >was >done with interactive task in mind. >Perhaps the best way to do this labor is to create some scripts (in >PHP, of >course) those could be runned out of line, in some hours of the nigth >using >CLI. for example see: >http://www.php.net/manual/en/features.commandline.usage.php > >Saludos desde Mérida, Yuc! > > >2014-05-22 21:08 GMT-05:00 Pak Ricard <pak...@gm...>: > >> Hi all: >> >> I'm facing some performance issues with my installation, mainly >because of >> some batch processes using a lot of resources. Every morning we >launch a >> custom script to optimize stock in every location, and do around 150 >> business checks and send emails to everyone concerned in the team, so >the >> first one opening webERP every morning launches the script >automatically >> (as the DB optimization fucntion does.) >> >> Used to work great but now it's taking too much time and shared >resources >> at the hosting space. I would like to split it in several tasks >launched by >> cron job, but problem is I have no idea how to write a webERP script >that >> is able to be launched by cron. >> >> Does someone have a sample that could be used as a template? >> >> Many thanks! >> >> Regards, >> Ricard >> >> >> >------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For >FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform >> available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> > > >-- >Ing Marcos R Garcia Trejo >(52) 9991-513412 >Laboratorio de Ingeniería y Procesos Costeros (LIPC) >Unidad Académica Sisal, UNAM >MGa...@ii... >Tel 52 988 931 1000 > > >------------------------------------------------------------------------ > >------------------------------------------------------------------------------ >"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >Instantly run your Selenium tests across 300+ browser/OS combos. >Get unparalleled scalability from the best Selenium testing platform >available >Simple to use. Nothing to install. Get started now for free." >http://p.sf.net/sfu/SauceLabs > >------------------------------------------------------------------------ > >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Phil D. <ph...@lo...> - 2014-05-23 05:13:48
|
The sales analysis reports can be run from cron they use the allow anyone variable so no output should be produced that could be exposed. Then use wget i think there is an example in the manual -- Phil Daintree +64(0)275 567890 Skype: daintree On May 23, 2014 4:05:00 PM NZST, Marcos Garcia Trejo <ad...@gm...> wrote: >I guess you need to forget (in part) the webERP job scheme, because it >was >done with interactive task in mind. >Perhaps the best way to do this labor is to create some scripts (in >PHP, of >course) those could be runned out of line, in some hours of the nigth >using >CLI. for example see: >http://www.php.net/manual/en/features.commandline.usage.php > >Saludos desde Mérida, Yuc! > > >2014-05-22 21:08 GMT-05:00 Pak Ricard <pak...@gm...>: > >> Hi all: >> >> I'm facing some performance issues with my installation, mainly >because of >> some batch processes using a lot of resources. Every morning we >launch a >> custom script to optimize stock in every location, and do around 150 >> business checks and send emails to everyone concerned in the team, so >the >> first one opening webERP every morning launches the script >automatically >> (as the DB optimization fucntion does.) >> >> Used to work great but now it's taking too much time and shared >resources >> at the hosting space. I would like to split it in several tasks >launched by >> cron job, but problem is I have no idea how to write a webERP script >that >> is able to be launched by cron. >> >> Does someone have a sample that could be used as a template? >> >> Many thanks! >> >> Regards, >> Ricard >> >> >> >------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For >FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform >> available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> > > >-- >Ing Marcos R Garcia Trejo >(52) 9991-513412 >Laboratorio de Ingeniería y Procesos Costeros (LIPC) >Unidad Académica Sisal, UNAM >MGa...@ii... >Tel 52 988 931 1000 > > >------------------------------------------------------------------------ > >------------------------------------------------------------------------------ >"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >Instantly run your Selenium tests across 300+ browser/OS combos. >Get unparalleled scalability from the best Selenium testing platform >available >Simple to use. Nothing to install. Get started now for free." >http://p.sf.net/sfu/SauceLabs > >------------------------------------------------------------------------ > >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Phil D. <ph...@lo...> - 2014-05-23 07:16:43
|
The sales analysis manual has the example - I knew I'd written sommat up: Automating Sales Reports Having created reports it is possible to email sales reports to defined recipients. A script called MailSalesReport.php is a template for doing this. There are no links to this script and no security level is set up for it. All that is required is to save this script to another file named anything with an extension of .php under the same directory as the other scripts. This script will need to be edited with the email addresses of the people to receive the report and the reportID - the system generated report number to be run. The lines to edit are: /*The Sales report to send */ $ReportID = 4; /*The people to receive the emailed report */ $Recipients = array('"Root" ','"some one else" '); The lines surrounded by /* and */ are comments. Once edited to the ReportID or choice and the Recipients all entered the file should be saved. To schedule the report to run an entry in crontab under a linux installation that would send the report at 0:0 each week day (assuming wget is installed in /usr/bin/wget and that the web server is on the same machine and the new script is called DailySalesReport.php) would be: # Scheduled email of a daily sales report 0 0 * * 2-5 root /usr/bin/wget http://localhost/web-erp/DailySalesReport.php since the page has no output - it would be pointless running it in a web browser although it would initiate another email to the defined recipients. A similar template script is available called MailSalesReport_csv.php that mails the comma separated values file for a ReportID to the Recipients defined in the script in just the same way as MailSalesReport.php script above. A more elegant solution to automatic emailing of sales analysis reports is available using the report_runner.php script this script can be run from a shell or directly from cron and takes command line parameters. This has the advantage instead of hardcoding a number or scripts this script can be run with the paratmers below: -r reportnumber (the number of the webERP report) -n reportname (the name you want to give the report) -e emailaddress[;emailaddress;emailaddres...] (who you want to send it to) [-t reporttext ] (some words you want to send with the report-optional) [ -H weberpHOME] (the home directory for weberp - or edit the php file) Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 23/05/14 14:08, Pak Ricard wrote: > Hi all: > > I'm facing some performance issues with my installation, mainly because > of some batch processes using a lot of resources. Every morning we > launch a custom script to optimize stock in every location, and do > around 150 business checks and send emails to everyone concerned in the > team, so the first one opening webERP every morning launches the script > automatically (as the DB optimization fucntion does.) > > Used to work great but now it's taking too much time and shared > resources at the hosting space. I would like to split it in several > tasks launched by cron job, but problem is I have no idea how to write a > webERP script that is able to be launched by cron. > > Does someone have a sample that could be used as a template? > > Many thanks! > > Regards, > Ricard > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Pak R. <pak...@gm...> - 2014-05-23 08:39:21
|
Thanks Phil: Will look at it in detail, and come back if I get something useful for the community :-) Regards, Ricard 2014-05-23 15:17 GMT+08:00 Phil Daintree <ph...@lo...>: > The sales analysis manual has the example - I knew I'd written sommat up: > > Automating Sales Reports > > Having created reports it is possible to email sales reports to defined > recipients. A script called MailSalesReport.php is a template for doing > this. There are no links to this script and no security level is set up > for it. All that is required is to save this script to another file > named anything with an extension of .php under the same directory as the > other scripts. > > This script will need to be edited with the email addresses of the > people to receive the report and the reportID - the system generated > report number to be run. The lines to edit are: > > /*The Sales report to send */ > $ReportID = 4; > > /*The people to receive the emailed report */ > $Recipients = array('"Root" ','"some one else" '); > > The lines surrounded by /* and */ are comments. > > Once edited to the ReportID or choice and the Recipients all entered the > file should be saved. > > To schedule the report to run an entry in crontab under a linux > installation that would send the report at 0:0 each week day (assuming > wget is installed in /usr/bin/wget and that the web server is on the > same machine and the new script is called DailySalesReport.php) would be: > > # Scheduled email of a daily sales report > > 0 0 * * 2-5 root /usr/bin/wget > http://localhost/web-erp/DailySalesReport.php > > since the page has no output - it would be pointless running it in a web > browser although it would initiate another email to the defined recipients. > > A similar template script is available called MailSalesReport_csv.php > that mails the comma separated values file for a ReportID to the > Recipients defined in the script in just the same way as > MailSalesReport.php script above. > > A more elegant solution to automatic emailing of sales analysis reports > is available using the report_runner.php script this script can be run > from a shell or directly from cron and takes command line parameters. > This has the advantage instead of hardcoding a number or scripts this > script can be run with the paratmers below: > > -r reportnumber (the number of the webERP report) > -n reportname (the name you want to give the report) > -e emailaddress[;emailaddress;emailaddres...] (who you want to send it to) > [-t reporttext ] (some words you want to send with the report-optional) > [ -H weberpHOME] (the home directory for weberp - or edit the php file) > > Phil > > Phil Daintree > Logic Works Ltd - +64 (0)275 567890 > http://www.logicworks.co.nz > > On 23/05/14 14:08, Pak Ricard wrote: > > Hi all: > > > > I'm facing some performance issues with my installation, mainly because > > of some batch processes using a lot of resources. Every morning we > > launch a custom script to optimize stock in every location, and do > > around 150 business checks and send emails to everyone concerned in the > > team, so the first one opening webERP every morning launches the script > > automatically (as the DB optimization fucntion does.) > > > > Used to work great but now it's taking too much time and shared > > resources at the hosting space. I would like to split it in several > > tasks launched by cron job, but problem is I have no idea how to write a > > webERP script that is able to be launched by cron. > > > > Does someone have a sample that could be used as a template? > > > > Many thanks! > > > > Regards, > > Ricard > > > > > > > ------------------------------------------------------------------------------ > > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > > Instantly run your Selenium tests across 300+ browser/OS combos. > > Get unparalleled scalability from the best Selenium testing platform > available > > Simple to use. Nothing to install. Get started now for free." > > http://p.sf.net/sfu/SauceLabs > > > > > > > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |
From: Pak R. <pak...@gm...> - 2014-05-25 12:42:39
|
Hi: Have been trying to use the MailSalesReport as a cron test but I'm getting the error: Fatal error: Call to undefined function DB_query() in /home4/username/public_html/mydomain.com/weberp/includes/GetConfig.php on line 10 So, something is missing, I guess it's an include file, but wihch one? I suppose the $AllowAnyone is meant to skip the login process. Any clue? Thanks! Regards, Ricard 2014-05-23 16:38 GMT+08:00 Pak Ricard <pak...@gm...>: > Thanks Phil: > > Will look at it in detail, and come back if I get something useful for the > community :-) > > Regards, > Ricard > > > 2014-05-23 15:17 GMT+08:00 Phil Daintree <ph...@lo...>: > > The sales analysis manual has the example - I knew I'd written sommat up: >> >> Automating Sales Reports >> >> Having created reports it is possible to email sales reports to defined >> recipients. A script called MailSalesReport.php is a template for doing >> this. There are no links to this script and no security level is set up >> for it. All that is required is to save this script to another file >> named anything with an extension of .php under the same directory as the >> other scripts. >> >> This script will need to be edited with the email addresses of the >> people to receive the report and the reportID - the system generated >> report number to be run. The lines to edit are: >> >> /*The Sales report to send */ >> $ReportID = 4; >> >> /*The people to receive the emailed report */ >> $Recipients = array('"Root" ','"some one else" '); >> >> The lines surrounded by /* and */ are comments. >> >> Once edited to the ReportID or choice and the Recipients all entered the >> file should be saved. >> >> To schedule the report to run an entry in crontab under a linux >> installation that would send the report at 0:0 each week day (assuming >> wget is installed in /usr/bin/wget and that the web server is on the >> same machine and the new script is called DailySalesReport.php) would be: >> >> # Scheduled email of a daily sales report >> >> 0 0 * * 2-5 root /usr/bin/wget >> http://localhost/web-erp/DailySalesReport.php >> >> since the page has no output - it would be pointless running it in a web >> browser although it would initiate another email to the defined >> recipients. >> >> A similar template script is available called MailSalesReport_csv.php >> that mails the comma separated values file for a ReportID to the >> Recipients defined in the script in just the same way as >> MailSalesReport.php script above. >> >> A more elegant solution to automatic emailing of sales analysis reports >> is available using the report_runner.php script this script can be run >> from a shell or directly from cron and takes command line parameters. >> This has the advantage instead of hardcoding a number or scripts this >> script can be run with the paratmers below: >> >> -r reportnumber (the number of the webERP report) >> -n reportname (the name you want to give the report) >> -e emailaddress[;emailaddress;emailaddres...] (who you want to send it to) >> [-t reporttext ] (some words you want to send with the report-optional) >> [ -H weberpHOME] (the home directory for weberp - or edit the php file) >> >> Phil >> >> Phil Daintree >> Logic Works Ltd - +64 (0)275 567890 >> http://www.logicworks.co.nz >> >> On 23/05/14 14:08, Pak Ricard wrote: >> > Hi all: >> > >> > I'm facing some performance issues with my installation, mainly because >> > of some batch processes using a lot of resources. Every morning we >> > launch a custom script to optimize stock in every location, and do >> > around 150 business checks and send emails to everyone concerned in the >> > team, so the first one opening webERP every morning launches the script >> > automatically (as the DB optimization fucntion does.) >> > >> > Used to work great but now it's taking too much time and shared >> > resources at the hosting space. I would like to split it in several >> > tasks launched by cron job, but problem is I have no idea how to write a >> > webERP script that is able to be launched by cron. >> > >> > Does someone have a sample that could be used as a template? >> > >> > Many thanks! >> > >> > Regards, >> > Ricard >> > >> > >> > >> ------------------------------------------------------------------------------ >> > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> > Instantly run your Selenium tests across 300+ browser/OS combos. >> > Get unparalleled scalability from the best Selenium testing platform >> available >> > Simple to use. Nothing to install. Get started now for free." >> > http://p.sf.net/sfu/SauceLabs >> > >> > >> > >> > _______________________________________________ >> > Web-erp-developers mailing list >> > Web...@li... >> > https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform >> available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> > > |
From: Pak R. <pak...@gm...> - 2014-05-26 10:02:02
|
Hi: Solved this error adding the line $DatabaseName = 'MyDatabaseName'; on the config.php file. Not sure if it is a security problem. Regards, Ricard 2014-05-25 20:41 GMT+08:00 Pak Ricard <pak...@gm...>: > Hi: > > Have been trying to use the MailSalesReport as a cron test but I'm getting > the error: > > Fatal error: Call to undefined function DB_query() in > /home4/username/public_html/mydomain.com/weberp/includes/GetConfig.php on > line 10 > > So, something is missing, I guess it's an include file, but wihch one? I > suppose the $AllowAnyone is meant to skip the login process. > > Any clue? > Thanks! > > Regards, > Ricard > > > 2014-05-23 16:38 GMT+08:00 Pak Ricard <pak...@gm...>: > > Thanks Phil: >> >> Will look at it in detail, and come back if I get something useful for >> the community :-) >> >> Regards, >> Ricard >> >> >> 2014-05-23 15:17 GMT+08:00 Phil Daintree <ph...@lo...>: >> >> The sales analysis manual has the example - I knew I'd written sommat up: >>> >>> Automating Sales Reports >>> >>> Having created reports it is possible to email sales reports to defined >>> recipients. A script called MailSalesReport.php is a template for doing >>> this. There are no links to this script and no security level is set up >>> for it. All that is required is to save this script to another file >>> named anything with an extension of .php under the same directory as the >>> other scripts. >>> >>> This script will need to be edited with the email addresses of the >>> people to receive the report and the reportID - the system generated >>> report number to be run. The lines to edit are: >>> >>> /*The Sales report to send */ >>> $ReportID = 4; >>> >>> /*The people to receive the emailed report */ >>> $Recipients = array('"Root" ','"some one else" '); >>> >>> The lines surrounded by /* and */ are comments. >>> >>> Once edited to the ReportID or choice and the Recipients all entered the >>> file should be saved. >>> >>> To schedule the report to run an entry in crontab under a linux >>> installation that would send the report at 0:0 each week day (assuming >>> wget is installed in /usr/bin/wget and that the web server is on the >>> same machine and the new script is called DailySalesReport.php) would be: >>> >>> # Scheduled email of a daily sales report >>> >>> 0 0 * * 2-5 root /usr/bin/wget >>> http://localhost/web-erp/DailySalesReport.php >>> >>> since the page has no output - it would be pointless running it in a web >>> browser although it would initiate another email to the defined >>> recipients. >>> >>> A similar template script is available called MailSalesReport_csv.php >>> that mails the comma separated values file for a ReportID to the >>> Recipients defined in the script in just the same way as >>> MailSalesReport.php script above. >>> >>> A more elegant solution to automatic emailing of sales analysis reports >>> is available using the report_runner.php script this script can be run >>> from a shell or directly from cron and takes command line parameters. >>> This has the advantage instead of hardcoding a number or scripts this >>> script can be run with the paratmers below: >>> >>> -r reportnumber (the number of the webERP report) >>> -n reportname (the name you want to give the report) >>> -e emailaddress[;emailaddress;emailaddres...] (who you want to send it >>> to) >>> [-t reporttext ] (some words you want to send with the report-optional) >>> [ -H weberpHOME] (the home directory for weberp - or edit the php file) >>> >>> Phil >>> >>> Phil Daintree >>> Logic Works Ltd - +64 (0)275 567890 >>> http://www.logicworks.co.nz >>> >>> On 23/05/14 14:08, Pak Ricard wrote: >>> > Hi all: >>> > >>> > I'm facing some performance issues with my installation, mainly because >>> > of some batch processes using a lot of resources. Every morning we >>> > launch a custom script to optimize stock in every location, and do >>> > around 150 business checks and send emails to everyone concerned in the >>> > team, so the first one opening webERP every morning launches the script >>> > automatically (as the DB optimization fucntion does.) >>> > >>> > Used to work great but now it's taking too much time and shared >>> > resources at the hosting space. I would like to split it in several >>> > tasks launched by cron job, but problem is I have no idea how to write >>> a >>> > webERP script that is able to be launched by cron. >>> > >>> > Does someone have a sample that could be used as a template? >>> > >>> > Many thanks! >>> > >>> > Regards, >>> > Ricard >>> > >>> > >>> > >>> ------------------------------------------------------------------------------ >>> > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> > Instantly run your Selenium tests across 300+ browser/OS combos. >>> > Get unparalleled scalability from the best Selenium testing platform >>> available >>> > Simple to use. Nothing to install. Get started now for free." >>> > http://p.sf.net/sfu/SauceLabs >>> > >>> > >>> > >>> > _______________________________________________ >>> > Web-erp-developers mailing list >>> > Web...@li... >>> > https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>> >>> >>> ------------------------------------------------------------------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. >>> Get unparalleled scalability from the best Selenium testing platform >>> available >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> _______________________________________________ >>> Web-erp-developers mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>> >> >> > |
From: Pak R. <pak...@gm...> - 2014-05-26 10:16:15
|
Sorry I messed up. Not in config.sys, but in the script itself (MailSalesReport.php). Regards, Ricard 2014-05-26 18:01 GMT+08:00 Pak Ricard <pak...@gm...>: > Hi: > > Solved this error adding the line > $DatabaseName = 'MyDatabaseName'; > > on the config.php file. Not sure if it is a security problem. > > > > Regards, > Ricard > > > 2014-05-25 20:41 GMT+08:00 Pak Ricard <pak...@gm...>: > > Hi: >> >> Have been trying to use the MailSalesReport as a cron test but I'm >> getting the error: >> >> Fatal error: Call to undefined function DB_query() in >> /home4/username/public_html/mydomain.com/weberp/includes/GetConfig.phpon line 10 >> >> So, something is missing, I guess it's an include file, but wihch one? I >> suppose the $AllowAnyone is meant to skip the login process. >> >> Any clue? >> Thanks! >> >> Regards, >> Ricard >> >> >> 2014-05-23 16:38 GMT+08:00 Pak Ricard <pak...@gm...>: >> >> Thanks Phil: >>> >>> Will look at it in detail, and come back if I get something useful for >>> the community :-) >>> >>> Regards, >>> Ricard >>> >>> >>> 2014-05-23 15:17 GMT+08:00 Phil Daintree <ph...@lo...>: >>> >>> The sales analysis manual has the example - I knew I'd written sommat up: >>>> >>>> Automating Sales Reports >>>> >>>> Having created reports it is possible to email sales reports to defined >>>> recipients. A script called MailSalesReport.php is a template for doing >>>> this. There are no links to this script and no security level is set up >>>> for it. All that is required is to save this script to another file >>>> named anything with an extension of .php under the same directory as the >>>> other scripts. >>>> >>>> This script will need to be edited with the email addresses of the >>>> people to receive the report and the reportID - the system generated >>>> report number to be run. The lines to edit are: >>>> >>>> /*The Sales report to send */ >>>> $ReportID = 4; >>>> >>>> /*The people to receive the emailed report */ >>>> $Recipients = array('"Root" ','"some one else" '); >>>> >>>> The lines surrounded by /* and */ are comments. >>>> >>>> Once edited to the ReportID or choice and the Recipients all entered the >>>> file should be saved. >>>> >>>> To schedule the report to run an entry in crontab under a linux >>>> installation that would send the report at 0:0 each week day (assuming >>>> wget is installed in /usr/bin/wget and that the web server is on the >>>> same machine and the new script is called DailySalesReport.php) would >>>> be: >>>> >>>> # Scheduled email of a daily sales report >>>> >>>> 0 0 * * 2-5 root /usr/bin/wget >>>> http://localhost/web-erp/DailySalesReport.php >>>> >>>> since the page has no output - it would be pointless running it in a web >>>> browser although it would initiate another email to the defined >>>> recipients. >>>> >>>> A similar template script is available called MailSalesReport_csv.php >>>> that mails the comma separated values file for a ReportID to the >>>> Recipients defined in the script in just the same way as >>>> MailSalesReport.php script above. >>>> >>>> A more elegant solution to automatic emailing of sales analysis reports >>>> is available using the report_runner.php script this script can be run >>>> from a shell or directly from cron and takes command line parameters. >>>> This has the advantage instead of hardcoding a number or scripts this >>>> script can be run with the paratmers below: >>>> >>>> -r reportnumber (the number of the webERP report) >>>> -n reportname (the name you want to give the report) >>>> -e emailaddress[;emailaddress;emailaddres...] (who you want to send it >>>> to) >>>> [-t reporttext ] (some words you want to send with the report-optional) >>>> [ -H weberpHOME] (the home directory for weberp - or edit the php file) >>>> >>>> Phil >>>> >>>> Phil Daintree >>>> Logic Works Ltd - +64 (0)275 567890 >>>> http://www.logicworks.co.nz >>>> >>>> On 23/05/14 14:08, Pak Ricard wrote: >>>> > Hi all: >>>> > >>>> > I'm facing some performance issues with my installation, mainly >>>> because >>>> > of some batch processes using a lot of resources. Every morning we >>>> > launch a custom script to optimize stock in every location, and do >>>> > around 150 business checks and send emails to everyone concerned in >>>> the >>>> > team, so the first one opening webERP every morning launches the >>>> script >>>> > automatically (as the DB optimization fucntion does.) >>>> > >>>> > Used to work great but now it's taking too much time and shared >>>> > resources at the hosting space. I would like to split it in several >>>> > tasks launched by cron job, but problem is I have no idea how to >>>> write a >>>> > webERP script that is able to be launched by cron. >>>> > >>>> > Does someone have a sample that could be used as a template? >>>> > >>>> > Many thanks! >>>> > >>>> > Regards, >>>> > Ricard >>>> > >>>> > >>>> > >>>> ------------------------------------------------------------------------------ >>>> > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>>> > Instantly run your Selenium tests across 300+ browser/OS combos. >>>> > Get unparalleled scalability from the best Selenium testing platform >>>> available >>>> > Simple to use. Nothing to install. Get started now for free." >>>> > http://p.sf.net/sfu/SauceLabs >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > Web-erp-developers mailing list >>>> > Web...@li... >>>> > https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>>> Instantly run your Selenium tests across 300+ browser/OS combos. >>>> Get unparalleled scalability from the best Selenium testing platform >>>> available >>>> Simple to use. Nothing to install. Get started now for free." >>>> http://p.sf.net/sfu/SauceLabs >>>> _______________________________________________ >>>> Web-erp-developers mailing list >>>> Web...@li... >>>> https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>> >>> >>> >> > |