Okyanet
asked on
Daily export MySQL reports to email
I have an ecommerce site that currently allows me to run transaction reports on demand.
However, I want to have the reports run automatically, every day at 0100am.
I imagine this could be done with a crontab and some kind of query to pull the relevant data from the MySQL database, format it into a csv file, then send the csv as an attachment to a specified email address.
Is there a software tool that will allow me to do all of the above?
Or is there a relatively easy way to implement it with a crontab set to execute a script that will do that?
I have very limited programming skills so it would be great to find an existing script that I could adapt to my site. Thanks in advance!
ps. my site is hosted on a unix VPS, administrated via Plesk. Please let me know if more info is required
However, I want to have the reports run automatically, every day at 0100am.
I imagine this could be done with a crontab and some kind of query to pull the relevant data from the MySQL database, format it into a csv file, then send the csv as an attachment to a specified email address.
Is there a software tool that will allow me to do all of the above?
Or is there a relatively easy way to implement it with a crontab set to execute a script that will do that?
I have very limited programming skills so it would be great to find an existing script that I could adapt to my site. Thanks in advance!
ps. my site is hosted on a unix VPS, administrated via Plesk. Please let me know if more info is required
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
split in 2
ASKER
Thanks guys!
mutt -s "mail-subject" -a /tmp/result.txt mail-id@host.ext < mail-body-file.txt