I am trying to implement a scheduler which will run every 24 hours for my java application. The scheduler is associated with Mongo DB records. I would like to delete the files which are named exactly same as the ID of Mongo DB auto deleted documents. I think scanning the whole documents of a collection and cross checking with the file names would not be the good solution.
What is the best way to do? I have tried using the logs of profiler but, It is not storing the auto deleted records.