In my app I create temp dirs every time user commits a certain action. Is there a chance to somwhow set ‘expire’ on that dirs? I need to delete those dirs exactly after hour since they were created.
I was thinking about CRONJOB but it will only run once an hour. This will not necessarily delete dirs exactly after one hour.
Thanks in advance.
You could use
atto schedule the removal of a particular directory. This has the advantage that even if you modify the directory after it is created (adjusting its modify time – the create time is not stored), you will get the correct directory removed. The granularity onatis 1 minute.