The sessions in cherrypy are expired and removed given the parameters of the session:
- timeout: specify the minutes of inactivity to mark it as expired.
- clean_freq: specify the frequency of the session cleaning in minutes
For example to dispatch a thread to delete the files each 3 minutes and a timeout of 5 minutes then just configure the session like this:
{'tools.sessions.timeout': 5,
'tools.sessions.clean_freq': 3}
For more information on the properties of the session check out the official documentation.
But if you are looking to execute the cleaning by a cronjob why not just specify +4 instead of +5 to include the 5 on the date range, like:
find /path/to/files* -mtime +4 -exec rm {} \;