基于Mongo DB自动删除记录删除物理文件的调度器 [英] Scheduler for deleting physical files based on Mongo DB auto deleted records

查看:86
本文介绍了基于Mongo DB自动删除记录删除物理文件的调度器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的 java 应用程序实现一个每 24 小时运行一次的调度程序.调度程序与 Mongo DB 记录相关联.我想删除名称与Mongo DB自动删除文档的ID完全相同的文件.我认为扫描一个集合的整个文档并与文件名交叉检查不是一个好的解决方案.

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.

推荐答案

转到 Quartz 调度程序.检查 http://www.mkyong.com/tutorials/quartz-scheduler-tutorial/

Go for quartz scheduler. Check http://www.mkyong.com/tutorials/quartz-scheduler-tutorial/

这篇关于基于Mongo DB自动删除记录删除物理文件的调度器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆