From e65f6ff5bfe38455ca33f77685371d71351e992c Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Fri, 12 Mar 2021 20:55:02 +0800 Subject: [PATCH] Make bash script for weekly reports #545 --- public/cust_reports/.gitkeep | 1 + .../generateCurrentMonthCustomerSourceReport.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 public/cust_reports/.gitkeep diff --git a/public/cust_reports/.gitkeep b/public/cust_reports/.gitkeep new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/public/cust_reports/.gitkeep @@ -0,0 +1 @@ + diff --git a/utils/current_customer_source_report/generateCurrentMonthCustomerSourceReport.sh b/utils/current_customer_source_report/generateCurrentMonthCustomerSourceReport.sh index 79268c3a..6ed86695 100755 --- a/utils/current_customer_source_report/generateCurrentMonthCustomerSourceReport.sh +++ b/utils/current_customer_source_report/generateCurrentMonthCustomerSourceReport.sh @@ -1,3 +1,7 @@ #!/bin/sh -/var/www/resq/bin/console report:customer_source $1 $2 /tmp/customer_source_report_$1$2.csv +MONTH=`date +"%m"` +YEAR=`date +"%Y"` +FILE_DATE=`date +"%Y%m%d"` +FILE="/var/www/resq/public/cust_reports/cust_report_$FILE_DATE.csv" +/var/www/resq/bin/console report:customer_source $YEAR $MONTH $FILE