With
cron you can run any command that you could from the shell. So, you could run a command like the one above or you could run a command that runs a script, so that script can do even more.
You might want to change the mysql command a bit. I generally use
- Code: Select all
mysqldump --add-drop-table -u {username} -p {database name} > {directory file name}
I like this better because I think it makes it easier to restore.