随笔分类 -  [08] Quartz.Net

Quartz.Net
摘要:一、Job状态Quartz.NET提供了 IStatefulJob(有状态作业)、IInterruptableJob(无状作业)这2个接口;官方文档中实现方式:public interface IStatefulJob : IJob { }public interface IInterruptableJob : IJob { //中断方法 void Interrupt(); }注:一个Job实例可以被定义为"有状态的"或者"无状态的"。在执行无状态的任务过程中任何对JobDataMap所作的更改都将丢失。有状态的任务恰好相反,它在任务的每次执行之后重新存 阅读全文
posted @ 2013-06-04 17:11 舍长 阅读(1782) 评论(1) 推荐(0) 编辑
摘要:为什么选择Windows Service作为承载主体?Quartz.Net只是一个作业调度框架,其承载的主体没有限制,可以是ConsoleApp, WebForm, WebApp, MVC etc. 但是只有Windows Service是最稳定的,而且支持自启动如何选择合适的Windows Service?直接使用Quartz.Net自动的Server端,即Windows Service + Topself,优点:无需重复开发、跨平台安装自带的Windows Service1. 新建目录目录:D:\Developer\QuartzNET\Server,并拷贝如下文件(之所以新建拷贝,是不想影 阅读全文
posted @ 2013-04-12 17:51 舍长 阅读(2737) 评论(6) 推荐(0) 编辑
摘要:第一种方式:直接写入代码中 NameValueCollection properties = new NameValueCollection(); properties["quartz.scheduler.instanceName"] = "ConsoleScheduler"; properties["quartz.scheduler.instanceId"] = "instance_one"; properties["quartz.threadPool.type"] = "Quart 阅读全文
posted @ 2013-04-12 16:44 舍长 阅读(1720) 评论(0) 推荐(0) 编辑
摘要:下载Quartz.net 2.1.2,新建控制台应用程序,并添加如下引用控制台程序代码如下View Code using System;using System.Collections.Generic;using System.Collections.Specialized;using System.Linq;using System.Text;using System.Threading.Tasks;using log4net;using Quartz;using Quartz.Impl;using Quartz.Job;namespace QuartzNET212ConsoleApp{ . 阅读全文
posted @ 2013-04-12 16:15 舍长 阅读(1782) 评论(11) 推荐(0) 编辑
摘要:一、Quartz.net简单说明:Quartz.NET is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems,更多内容请移步http://quartznet.sourceforge.net/下载地址:http://quartznet.sourceforge.net/download.html(根据需要请自行下载)一个示例:本示例仅仅是为了说明Quartz.net作为一个作业调度框架,其使用是多么简单。c 阅读全文
posted @ 2012-04-10 16:55 舍长 阅读(2181) 评论(2) 推荐(1) 编辑

点击右上角即可分享
微信分享提示