简体   繁体   中英

.NET scheduler that runs assemblies?

This may already exist I hope.

I want to create a Windows service that schedules tasks (much like the Windows oe) but it would run C# assembles dynamically from a local folder (schedule rules via a XML file for that task) so I don't have to create a Windows service or console application every time I want some automation code but can build an assembly, upload it to a directory with a XML config for the timing and it will run/ be detected ba folder watcher.

Does this already exist or will I have to build it?

It's probably starting to look like I'm promoting this.... Try Quartz.Net

http://quartznet.sourceforge.net/

听起来像Windows PowerShell的工作。

I assume you want to automate the invocation of code in any arbitrary .NET assembly, even those for which you don't have the source code, rather than a plug-in approach with a well defined interface. If so you'll be building a generic service that can watch the config file, which itself must contain all of the details on which assemblies to load, which types to instantiate, which properties to set, which methods to call and their arguments, etc. You might perform all of this work via reflection, or Unity and/or XAML may be of help in constructing the objects.

Depending on how sophisticated you want to get, your config file will end up looking very much like C# code, so it may not be as worthwhile an exercise as you think.

http://www.jamsscheduler.com/doc/DevelopersGuide/Default.html上查看.NET命名空间文档这是一个基于.NET的商业作业调度系统,但是我使用了免费的Developer's Edition。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM