Giter Site home page Giter Site logo

quartznet-extensions's Introduction

quartznet-extensions

Provides helper methods for configuring Quartz.NET scheduler with a persistent JobStore.

Usage

Below are some examples on how to create a new scheduler. Note that InstanceName must be a unique identifier for your scheduler and is used to distinguish schedulers that are using the same JobStore.

See Quartz Configuration Reference for information about the available configuration properties.

Database tables are not created automatically. The required tables must first be created by running the provided script.

SqlServer

Database script: https://github.com/quartznet/quartznet/blob/master/database/tables/tables_sqlServer.sql

With default configuration:

IScheduler scheduler = await SqlServerSchedulerFactory.GetDefaultScheduler("InstanceName", "ConnectionString");
await scheduler.Start();

With custom configuration:

var config = new QuartzSqlServerConfiguration("InstanceName", "ConnectionString") {
    ThreadPool = new QuartzThreadPoolConfiguration()
    {
      ThreadCount = 10
    }
};

IScheduler scheduler = await SqlServerSchedulerFactory.GetDefaultScheduler(config);
await scheduler.Start();

PostgreSQL

Database script: https://github.com/quartznet/quartznet/blob/master/database/tables/tables_postgres.sql

With default configuration:

IScheduler scheduler = await PostgreSqlSchedulerFactory.GetDefaultScheduler("InstanceName", "ConnectionString");
await scheduler.Start();

With custom configuration:

var config = new QuartzPostgreSqlConfiguration("InstanceName", "ConnectionString") {
    ThreadPool = new QuartzThreadPoolConfiguration()
    {
      ThreadCount = 10
    }
};

IScheduler scheduler = await PostgreSqlSchedulerFactory.GetDefaultScheduler(config);
await scheduler.Start();

quartznet-extensions's People

Contributors

slettan avatar asleire avatar

Watchers

James Cloos avatar Tor Christian Angeltveit avatar Rune Synnevåg avatar Espen Halvorsen avatar Stein-Olav Davidsen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.