#Cron Job for deleting old files (PHP)
This code deletes ".gz" files older than 30 days in a "directory" and its subdirectories. It's intended to be used for automatic delete of old cPanel backups.
<?php
$count=0;
rrmdir(public_html); //target directory
echo $count . ' file(s) deleted!';