Job Scheduling framework quartz. NET 2.0 Beta released

Source: Internet
Author: User

After more than one year of development, quartz. NET 2.0 released a beta version, corresponding to Java quartz 2.1, http://quartznet.sourceforge.net/download.html. Compared with Version 1.0, the entire version has undergone a lot of modifications, and the unit test code is more friendly (more interfaces are reconstructed). APIs are based on generic and. net 3.5 SP1 features, such as datetimeoffset. This is the largest and most exciting version of quartz. Net in history.

In addition to performance improvement, this version adds the following new features:

  • Scheduler. Clear () provides a convenient way to clear all tasks, triggers, and schedules.
  • The schedtionary. schedulejobs (idictionary> triggersandjobs, Boolean replace) method can add tasks and triggers in batches.
  • The schedger. unschedulejobs (ilist triggerkeys) method provides
  • Schedjobs. deletejobs (ilist jobkeys), needless to say, this is a batch Delete task
  • Schedists. checkexists (jobkey) and schedists. checkexists (triggerkey) provide Uniqueness for checking task keywords
  • Adojobstore allows one set of tables to be used by multiple distinct scheduler instances
  • Adojobstore is now capable of storing non-core trigger implementations without using blob columns, through the use of the new role interface, which can (optionally) be implemented by implementers of Custom trigger types.
  • Cron expressions support specifying the last day and last week of a month, such as L-3 for the last three days of a month
  • The XML file containing scheduling information adds a method to specify the start time and interval.
  • You can specify the priority attribute for a trigger in an XML file.
  • Added the core task directoryscanjob. The filescanjob added a mini mum age parameter.

2.0 significant changes have also been made to the API. The collection of API return values and the use of generics eliminate ambiguity and redundant code and hide/delete methods that should not be disclosed to the client, improve separation of focus and introduce the core entities (jobs and triggers) of DSL with a specific domain language. Naturally, compatibility and other issues arise. Let's take a look at all major changes:

  • It does not support. NET 1.1 and 2.0. At least. NET 2.0 SP1 is required for quartz.net 3.5 because of the adoption of new language features and class interfaces.
  • The returned values of many public interfaces are changed to generic ilist and Iset. For example, getjobgroupnames (): String [] is now changed to getjobgroupnames (): ilist, currently, jobs and triggers are identified based on jobskey and triggerskey. Keys contains a name and a group. The keys is used as the parameter to operate specific jobs/triggers methods. For example, gettrigger (triggerkey key): itrigger replaces gettrigger (string name, string group): trigger. Currently, itrigger is an interface rather than a class. The same applies to isimpletrigger and icrontrigger. The new DSL/builder-based API organizes jobs and triggers.

Ijobdetail job = jobbuilder. Create <simplejob> (). withidentity ("job1", "group1"). Build ();

Itrigger trigger = triggerbuilder. create (). withidentity ("trigger1", "group1 "). startat (datebuilder. futuredate (2, intervalunit. hours )). withsimpleschedule (x => X. repeathourlyforever ()). modifiedbycalendar ("Holidays "). build ();

  • Jobinitializationplugin has been removed and replaced by xmlschedulingdataprocessorplugin.
  • Microsoft's Oracle drivers is no longer supported. Use 10g or 11g ODP. Net drivers instead.
  • The sechema of the database has been modified. You need to use the script in the database directory to upgrade schema of 1.x to 2.0.

References:

  • Quartz. Net-version Migration Guide
  • Java quartz's documentation.

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.