Scheduler for deleting physical files based on Mongo DB auto deleted records

南楼画角 提交于 2019-12-25 07:57:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!