You will find most details on how to setup a cron job in
Briefly, you have to edit the crontab and add the time specification and the command to execute. First task
second add something like this
Code:
*/10 * * * * test -d /path/to/dir_to_clean && rm -rf /path/to/dir_to_clean/*
this will run the command line every 10 minutes of each hour and each day of the year, removing the content of dir_to_clean (if it exists). Please, when you are going to test an harmful command (indeed
rm -rf is) double or triple check what you are typing. The risk is to delete something like your home dir or the whole system (if logged as root)