如何构建一个批处理过程,该过程将在c#中的特定日期和时间运行? [英] How do you build a batch process which will run at specific days and times in c# ?
本文介绍了如何构建一个批处理过程,该过程将在c#中的特定日期和时间运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的专家,
C#新手。
你如何建立一个批处理过程,它将在C#中的特定日期和时间运行?
请我是c#的新手。
通过大量的例子,但我没有给初学者一个简单的例子。
谢谢
我尝试了什么:
检查互联网但未获得一个简单的介绍
Dear Expert,
New to C#.
How do you build a batch process which will run at specific days and times in C# ?
Please I am new to c#.
Gone through a lot of examples, but i am not getting a simple example for beginners.
Thanks
What I have tried:
Checked the internet and not getting a simple intro
推荐答案
除了'批处理'之外,你没有提供很多关于你想要实现的信息
- 确实需要容错,故障后恢复,持久性,日志记录,监控,访问控制等。
- 什么是批处理 - 一些可执行文件(exe)由DOS脚本或其他一些脚本连在一起?
- 考虑到上一个问题,失败的'粒度'是什么?
- 你想要'失败过程'的电子邮件
- 是这是一个完全自动化或部分自动化的工作流程吗?
- 你有什么版本的Windows等
所以你有点难以回答除非是非常笼统的术语 - 首先,您可以考虑: -
选项1:由Quartz.Net运行的一组c#控制台程序/ dos脚本运行'独立'或Windows任务调度程序
选项2:使用嵌入式Quartz.Net运行任务(exe)作为'程序集'的c#中的Windows 32服务
这2个选项很容易启动,但你需要自己添加所有框架
选项3:A完全成熟的批处理器成本计算
you dont provide a lot of information on what you're trying to achieve apart from 'batch process'
- do need need fault tolerance, recovery after failure, persistence, logging, monitoring, access control etc.
- What is a batch process - a number of executables (exe's) held together by DOS script or some other script ?
- given the previous question, what is the 'granularity' of failure
- do you want emails on 'failed processes'
- is this a fully automated or partially automated workflow ?
- What version of windows etc you have
So you make it a bit hard to answer except in very general terms - for a start, you could consider :-
option 1 : a set of c# console programs/dos scripts scheduled by Quartz.Net running 'standalone' or the Windows task scheduler
option 2 : a Windows 32 Service in c# using embedded Quartz.Net running tasks (exe's) as 'assemblies'
These 2 options are easy enough to start, but you need to add all the framework yourself
option 3 : A fully fledged batch processor costing
(过去曾使用过一些很好的 - ActiveBatch,JAMS Scheduler来命名两个)
有很多种皮肤猫的方法 - 但没有详细的要求等我不能告诉使用哪把刀
(there are some nice ones Ive used in the past - ActiveBatch, JAMS Scheduler to name two)
There's umpteen ways to skin a cat - but without detailed requirements etc I cant tell which knife to use
[edit add Visual Cron, Adtempus to the list of 'fully fledged' batch processors - Ive used ActiveBatch and AdTempus extensively, depending on your requirements, they could be a match if you had some cash - not a large amount for AdTempus]
这篇关于如何构建一个批处理过程,该过程将在c#中的特定日期和时间运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文