Scripting to backup mySQL databases

Assistance in writing a script that will:-

a) backup mySQL databases at 00:01, together a log to state that backups are completed successfully or failed and and e-mail notification is sent out
b) mySQL databases are kept for 7days before they are archived

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.