General Structure of Quartz.NET and How To Implement It
General Structure of Quartz.NET and How To Implement It
General Structure of Quartz.NET and How To Implement It
1. Simple job schedule structure

Simple job schedule graph_01
The demo structure about the graph above could be:

The most important snippets are in “Example.cs” file :

And “SimpleJob.cs” would like :

It will run while user delivery the “Run()” in “Example.cs”. And we would see she screen shot like this:

2. Remote job schedule structure

Remote job schedule graph_02
The Demo structure could dive into two parts, the one is the client and the other is the server. The demo structure should be:


The most important code snippets in “clientExample.cs” are:

Note: If you do not use DB to store the data of schedule you can comment out the content named “set db info”.

This line is used to set the instance name, it is costumed.

This part is used to set the thread info about the job. It should be set both client side and server side code.

If you plan to use DB as your persistent level to store the scheduler data the part above is very necessary, otherwise, you could get rid of it from your code.
The first line is to tell quartz that you are going to store your scheduler data into the DB through ADO.NET.
The second line of this part, tell the quartz that you would use the default method to store your schedule data into DB. Because ADO.NET is default method to store the data in Quartz.NET, so we use default as the property.
The third line tells the quartz that your table name prefix. E.g. If there is a table named QRTZTest_Hello”, through the ‘QRTZTest_’ prefix, quartz would find it while running.
The fourth line tells the connection string to access your DB where the scheduler data stored.
The last line tells quartz that the DB is MSSQL. Because now quartz supports many different DB, e.g. Oracle, MySQL, SQLite, MSSQL etc. so this property is important.
Note: All the properties above about DB, should be set in client demo and server demo when you use DB as the persistent level to store your schedule data.

These properties are used to set remote exporter. And in server, should set following properties for suite.

At last, all the jobs in server could be able to delivery by the method in client. Yes, you should start two instances when you debug it. Client instance first, and then the server instance.
And you can see the result in the server instance.

Note: You must add “TopShelf” namespace into the server code.
While if the DB has been used as persistent level. The scheduler data could be seen in the table like this:

Additionally, how to run the server as a service by “Topshelf”
1) Compile the server project.
2) Find the executable file produce by the first step
3) Then run cmd prompt as administrator and input the like this:
The executable file name could be replaced by any of yourselves.
4) At last you could find it has been installed in your Services:
General Structure of Quartz.NET and How To Implement It的更多相关文章
- Navigation - How to define the structure of the navigation tree via the NavigationItemAttribute
In the meantime, you should use the Model Editor to create such a navigation structure. There are se ...
- 170. Two Sum III - Data structure design【easy】
170. Two Sum III - Data structure design[easy] Design and implement a TwoSum class. It should suppor ...
- [Algorithm] Heap data structure and heap sort algorithm
Source, git Heap is a data structure that can fundamentally change the performance of fairly common ...
- iOS编码规范
The official raywenderlich.com Objective-C style guide. This style guide outlines the coding con ...
- URL Parsing
[URL Parsing] urllib.parse.urlparse(urlstring, scheme='', allow_fragments=True) Parse a URL into six ...
- A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python)
A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python) MACHINE LEARNING PYTHON ...
- 官方的objective - c风格指南。
The official raywenderlich.com Objective-C style guide. This style guide outlines the coding convent ...
- What a version number means
http://stackoverflow.com/questions/3768261/best-practices-guidance-for-maintaining-assembly-version- ...
- Bluetooth
Android provides a default Bluetooth stack, BlueDroid, that is divided into two layers: The Bluetoot ...
随机推荐
- Android网络通信android-async-http入门
android-async-http入门 门免费链接分享前:http://pan.baidu.com/s/1mg9SvgO 密码:cgg7 API原文:http://loopj.com/android ...
- oracle_导入、导出数据
逐步整理oracle导入导出数据 1.单表,不同库之间的导入导出 导出exp system/manager@myoracle file=d:\daochu.dmp tables=(table1) sy ...
- HDU 1080 Human Gene Functions--DP--(变形最长公共子)
意甲冠军:该基因序列的两端相匹配,四种不同的核苷酸TCGA有不同的分值匹配.例如T-G比分是-2,它也可以被加入到空格,空洞格并且还具有一个相应的核苷酸匹配分值,求最大比分 分析: 在空气中的困难格的 ...
- POJ 3176-Cow Bowling(DP||记忆化搜索)
Cow Bowling Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14210 Accepted: 9432 Desc ...
- Unix/Linux环境C编程新手教程(41) C语言库函数的文件操作具体解释
上一篇博客我们解说了怎样使用Linux提供的文件操作函数,本文主要解说使用C语言提供的文件操作的库函数. 1.函数介绍 fopen(打开文件) 相关函数 open,fclose 表头文件 #in ...
- Socket 学习(一)
本次项目增加的引用using System.Net; using System.Net.Sockets; using System.Threading; TextBox.CheckForIllegal ...
- 随记两个SHELL文本处理
1,对于AWK通配符的处理 例如文本: AAAAAAAA(CZ航母STYLE+CZ航母STYLE+CZ航母STYLE+CZ航母STYLE);XXXX;CCCCC(F22战机+F22战机);33333( ...
- 七牛云存储C#例用小例子 C#笔记
最近有需求要把网站的图片传到云存储上去.于是就找到了七牛.看上面的SDK...看了才发现里面注释很少.当时看的头大.在网上搜一下,基本上没有好的例子.给初学者带来很大的不便!不过最后还是做出来了.在这 ...
- Ejb in action(七)——message与JMS
我们扩大MDBs学前,我们需要理解message(新闻)与JMS(Java Message Service)的概念. 我们在Java EE中谈论消息,实际上就是意味着实现一个松耦合的过程.系统组件之间 ...
- YUV格式转换RGB(基于opencv)
在编写代码将需要处理YUV格从每个视频帧中提取,然后将其保存为图片.有两种常见的方法在线,第一种是通过opencv自带cvCvtColor,可是这样的方法有bug.得到的图片会泛白.另外一种方法是公式 ...