Mysqljan is a project mainly written in ..., it's free.
Mysql backup and optimize script
Synopsis: creates a backup of all mysql database files and optimizes all tables Prerequisites: mysqlhotcopy and mysqlcheck must be installed Usage: copy and change this file to /root/bin test it from the command line link the file into e.g. /etc/cron.daily