问题
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.
回答1:
Go for quartz scheduler. Check http://www.mkyong.com/tutorials/quartz-scheduler-tutorial/
来源:https://stackoverflow.com/questions/28750366/scheduler-for-deleting-physical-files-based-on-mongo-db-auto-deleted-records