Web Hosting Talk







View Full Version : Cron Job To mail file


jdk
05-18-2005, 01:43 AM
I have a cron job that makes a backup of a mysql database and saves it as a .gz file in a public_html/backups folder...How would I using another cron job or I can add it to the current one I have to email the file to a given email address and then delete the file saved on the server from 3 days prior. That way only today, yesterday, and the day before backups remain on the server?

orbitz
05-18-2005, 03:03 AM
why don't you add those functions to the current script.

jdk
05-18-2005, 08:57 AM
I could do you know what functions they are?

orbitz
05-18-2005, 09:01 AM
mail();
unlink();
but you have to write more to make it work for your purpose.
oryou could search for some script with file attachment ...