The original script was found in the MySQL 5.1 Reference Manual - thanks to Wade Hedgren for posting this.
You will need to adapt the script to suit your needs, by changing the
I referred to Stack Overflow to figure out how to format the date:
To have the script run automatically, simply create a new Scheduled Task.
I hope you find this script useful.