Hi, You can run a php script as a shell script to delete files(dirs) every hours!
Here is a part of my script:
#!/usr/local/php511/bin/php
<?php
function your_functions()
// check and delete files
}
function run_self() {
your_functions();
sleep(3600);
run_self();
}
run_self();
?>
Save the script as a shell script like : delete_tmp_files.sh
chmod +x delete_tmp_files.sh
Run it:
./delete_tmp_files.sh &
It works for me, and only use a little CPU resource!