I\'ve written a big sql script that creates a CSV file. I want to call a cronjob every night to create a fresh CSV file and have it available on the website.
Say for
Simply escape to a shell from within mysql and execute a rm command to remove the file before you attempt to write it. For example:
Mysql> \\! rm -f /home/sites/example.com/www/files/backup.csv