Quartz.NET和移动文件的问题 [英] Quartz.NET and moving files questions

查看:65
本文介绍了Quartz.NET和移动文件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi all, I have a project ongoing at the moment which is create a Windows Service that essentially moves files around multiple paths. A job may be to, every 60 seconds, get all files matching a regular expression from an FTP server and transfer them to a Network Path, and so on. These jobs are stored in an SQL database.

当前,该服务采用控制台应用程序的形式,以简化开发.作业是使用ASP.NET页添加的,可以使用另一个ASP.NET页进行编辑.

Currently, the service takes the form of a console application, for ease of development. Jobs are added using an ASP.NET page, and can be editted using another ASP.NET page.

我有一些问题,一些与Quartz.NET有关,还有一些一般性问题.

I have some issues though, some relating to Quartz.NET and some general issues.

Quartz.NET:

Quartz.NET:

1:这是我最大的问题.鉴于我目前正在将该应用程序开发为控制台应用程序,因此必须在我的所有文件/页面上创建一个新的Quartz.NET调度程序.这会导致多个令人困惑的错误,但我只是 不知道如何在一个全局文件中初始化调度程序,并在我的ASP.NET页面中访问它们(例如,我可以将详细信息放入网格视图中进行编辑)

1: This is the biggest issue I have. Seeing as I'm developing the application as a console application for the time being, I'm having to create a new Quartz.NET scheduler on all my files/pages. This is causing multiple confusing errors, but I just don't know how to institate the scheduler in one global file, and access these in my ASP.NET pages (so I can get details into a grid view to edit, for example)

2:我的经理建议我考虑在Quartz.NET中使用多个配置".我的意思是,管理员可以在任何给定时间更改应用程序配置,以便仅特定选择的应用程序 跑步.在Quartz.NET中最简单的方法是什么?

2: My manager would suggested I could look into having multiple 'configurations' inside Quartz.NET. By this, I mean that at any given time, an administrator can change the applications configuration so that only specifically chosen applications run. What'd be the easiest way of doing this in Quartz.NET?

常规:

1:在此应用程序中至关重要的一件事是确保文件已被移动并且实际上位于目标路径上(删除原始文件后,因此如果文件被删除,这将是灾难性的实际上尚未被删除时被删除 已被复制!).我还需要确保文件内容在初始路径和目标路径上匹配,以使您放心复制的内容是正确的.我目前正在通过MD5散列初始文件,复制文件以及 删除它,确保文件在服务器上存在.然后,我对服务器上的文件进行哈希处理,并确保哈希值匹配.有没有更简单的方法可以做到这一点?我担心散列可能会对系统造成压力.

1: One thing that that's crucial in this application is assurance that the file has been moved and it's actually on the target path (after the move the original file is deleted, so it would be disastrous if the file is deleted when it hasn't actually been copied!). I also need to make sure that the files contents match on the initial path, and the target path to give peace of mind that what has been copied is right. I'm currently doing this by MD5 hashing the initial file, copying the file, and before deleting it make sure that the file exists on the server. Then I hash the file on the server and make sure the hashes match up. Is there a simpler way of doing this? I'm concerned that the hashing may put strain on the system.

2:这与上述问题有关,但

2: This relates to the above question, but isn't as important as not even my manager has any idea how I'd do this, but I'd love to implement this. An issue would arise if a job is executed when a file is being written to, which may be that a half written file will be transferred, thus making it totally useless, and it would also be bad as the the initial file would be destroyed while it's being written to! Is there a way of checking of this?

非常感谢能在这里为我提供帮助的任何人

Many thanks to anybody that can help me here

推荐答案

 

谢谢您的发帖!  ;我建议将您的问题发布到MS论坛之一中

Thank you for your post!  I would suggest posting your question in one of the MS Forum

Home ASP.NET Forums


这篇关于Quartz.NET和移动文件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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