Cron Backup

I’m looking to run a php script from Cron in cPanel. I have successfully managed to run another, pre-written, php script but I’m unable to write a second script for a related but different purpose.

I want to do the following in the php:

date=`date +\%Y-\%m-\%d--\%H:\%M`; tar -zcf ./BACKUPS/FOLDER_Bup_$date.tgz ./public_html/FOLDER | mailx -s "FOLDER Backed Up" [email protected] >/dev/null 2>&1

Can any help e convert this to a php script please?
Many thanks in advance.

Sponsor our Newsletter | Privacy Policy | Terms of Service