I have a large file system in which I have to delete certain directories from time to time. Currently I have a script which amongst other things, deletes a folder and subsequently generates an email notification. However, as the deletion of a directory can take anything from a few seconds to a few days, I would like to do this asychronously.
I can cook up a solution by say, generating little snippets like rm -rf /some/directory
in the appropriate cron
directory, but that might get clogged if a large number of large directories need to be deleted.
Is anyone aware of a better solution?