It is very easy to find and delete files older than x days.
Just use the following:
1 |
find /home/test/domains/test.com/public_html/tmp/ -mindepth 1 -mtime +5 -delete |
mtime gets how many days the files older then will be listed. +5 is for files older then 5 days.