Task Scheduling management tool based on quqrtz.net

Source: Internet
Author: User
Tags log4net

Before the national day, demand let me look at the Task Scheduling data table design. As before, there are more than 100 fields, p1 ~ p100, what do I say this is? Press this to write, write dead!

Then on the Internet search for the task of open-source scheduling, the first favorite is quartz.net,10.1 out and old leader party, old leader said another thing: Zookeeper, just searched, there is. NET version.

Preconceived, Zookeeper I don't go deep, the whole 10.1 at home in addition to watching movies is to see Quartz.

Quartz.net provides Remoting way, Remoting me 08 years, wrote a small program, let a server to notify another server to perform some tasks, simple application, in addition to these, in no depth.

Look at the structure:

Jobs is the mission.

Listener did not write well, do not show off.

QM. Server is the dispatch service of Quartz

QM. Shell is a management tool

I think of the management tools on the local, that is, service on the server, management tools on-premises, so easy to manage, but unless the local can find all the DLLs used by the dispatch service, otherwise it will not be able to load type XXX can not proceed.

With this problem, then the management tools and scheduling services are put together.

That is, to put the management tools and services together, it is not necessary to copy the DLL everywhere, but need to do some special processing

The following is the resulting directory structure:

XXXXXX Management Tools Directory,

Xxxxxx\service Dispatch service assembly is stored here

Xxxxxx\service\jobs task assembly is stored here

For the management and dispatch services to be able to find the task assembly, you need to change the app. config

App. Config for management tools

....   < Runtime >    <  xmlns= "urn:schemas-microsoft-com:asm.v1">      <   privatePath= "service/jobs"/>...

App. Config for the dispatch service

...   < Runtime >    <  xmlns= "urn:schemas-microsoft-com:asm.v1">      <   privatePath= "Jobs"/> ...

In this way, the newly written task assembly is placed under the Xxxxx\service\jobs, and the management tools and scheduling services can be found.

QM. What the Server uses:

Quartz.net 2.2.4.400

Log4net 1.2.10

Common.logging

Common.Logging.log4net because Log4net chooses is 1.2.10, so this can only use 2.0

Topshelf

These are listed because I use NuGet to search for installed Common.Logging.log4net, and the program exits as soon as it runs. Manually specifying 2.0 Common.Logging.log4net is not a problem.

Dispatch service I use SqlCe 4.0来 storage task information, so need to install SqlCe 4.0 driver, can download from here:

http://www.microsoft.com/en-us/download/details.aspx?id=17876

If you want to specify a different database, you can modify the Quartz.config

Quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, quartz quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz Quartz.jobStore.dataSource = ds quartz.dataSource.ds.connectionString = Data source=quartz.sdf; Persist Security Info=false; Quartz.dataSource.ds.provider = SqlServerCe-400

Because the administrative tools are based on Quartz REMOTING, you specify the following configurations in Quartz.coonfig:

Quartz.scheduler.exporter.type = Quartz.Simpl.RemotingSchedulerExporter, Quartzquartz.scheduler.exporter.port = 5555quartz.scheduler.exporter.bindname = TestSchedulerquartz.scheduler.exporter.channelType = Tcpquartz.scheduler.exporter.channelName = Httpquartz

Here I specify the port number is 5555, Bindname is Testscheduler, these two things to use on the management tool.

Listener, Listener cannot be managed by Remoting because not support. I try to make a pass UDP to broadcast Listener, do not know where not to write well, is not receiving data. I don't have a lot of crap if I don't do well.

What the management tool uses:

Quartz

Caliburn.micro

See Caliburn to know that this management tool is written in WPF! Nothing to say, look at:

Connection interface, the host is the IP where the service is dispatched

Ports and Scheduler are port and Bindname in the configuration described above

Trigger/Task list, which can be used to stop/start/edit/delete the specified task.

The calendar editing interface, currently only implements Holidaycalendar editing, Holiday is used to specify the date on which the task is not performed.

This function cron expression cannot be done, the other basic can be done by cron, so currently only implemented Holidaycalendar editing.

This is the Calendar list interface, the right side will be different calendar types to display the calendar details, but only now implemented Holidaycalendar, so the right side only this one interface.

Task editing interface, the trigger type editor currently only implements simple and Cron types.

Overview.

SOURCE Download:

http://files.cnblogs.com/xling/QuartzJobManager.7z

To run the sample, you need to run the QM. SHELL\BIN\DEBUG\SERVICE\QM. Server.exe then runs the QM. Shell.exe.

Quartz.net API is quite simple, there are many small features not added.

There is also a distributed, not to see the relevant information, no processing.

If you feel that it is useful to you, please have a good (likes ... Praise... Like a fart)!

------------------------------

qnmb! Gsq

Task Scheduling management tool based on quqrtz.net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.