Topshelf.Quartz.Integration 5.0.6

dotnet add package Topshelf.Quartz.Integration --version 5.0.6                
NuGet\Install-Package Topshelf.Quartz.Integration -Version 5.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Topshelf.Quartz.Integration" Version="5.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Topshelf.Quartz.Integration --version 5.0.6                
#r "nuget: Topshelf.Quartz.Integration, 5.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Topshelf.Quartz.Integration as a Cake Addin
#addin nuget:?package=Topshelf.Quartz.Integration&version=5.0.6

// Install Topshelf.Quartz.Integration as a Cake Tool
#tool nuget:?package=Topshelf.Quartz.Integration&version=5.0.6                

What is it?

Topshelf.Quartz.Integration is a package that extends the Topshelf Project. This package handles the boiler plate code necessary for quickly developing small self contained services on Windows that require integration with Quartz.NET, a job scheduling system.

You may schedule any number of Quartz jobs along with your service like this:

using System;
using Quartz;
using Topshelf;
using Topshelf.Quartz;

...

class Program
{
    static void Main()
    {
        HostFactory.Run(c =>
        {
            c.Service<SampleService>(s =>
            {
                s.ConstructUsing(() => new SampleService());

                s.WhenStarted((service, control) => service.Start());
                s.WhenStopped((service, control) => service.Stop());

                // Schedule a job to run in the background every 5 seconds.
                // The full Quartz Builder framework is available here.
                s.ScheduleQuartzJob(q =>
                    q.WithJob(() =>
                        JobBuilder.Create<SampleJob>().Build())
                    .AddTrigger(() =>
                        TriggerBuilder.Create()
                            .WithSimpleSchedule(builder => builder
                                .WithIntervalInSeconds(5)
                                .RepeatForever())
                            .Build())
                    );
            });
        });
    }
}

You can also add and use Quartz calendars like this:

using System;
using Quartz;
using Topshelf;
using Topshelf.Quartz;

...

class Program
{
    static void Main()
    {
        HostFactory.Run(c =>
        {
            c.Service<SampleService>(s =>
            {
                s.ConstructUsing(() => new SampleService());

                s.WhenStarted((service, control) => service.Start());
                s.WhenStopped((service, control) => service.Stop());

                // Adding a calendar to the Scheduler
                s.ConfigureQuartzScheduler(() => new SchedulerConfigurator()
                    .WithCalendar(() => new QuartzCalendarConfig("calendarName", GetCalendar()))
                );

                // Schedule a job to run in the background every 5 seconds.
                // Using the calendar specified above in the trigger.
                // The full Quartz Builder framework is available here.
                s.ScheduleQuartzJob(q =>
                    q.WithJob(() =>
                        JobBuilder.Create<SampleJob>().Build())
                    .AddTrigger(() =>
                        TriggerBuilder.Create()
                            .WithSimpleSchedule(builder => builder
                                .WithIntervalInSeconds(5)
                                .RepeatForever())
                            .ModifiedByCalendar("calendarName")
                            .Build())
                    );
            });
        });
    }

    private static ICalendar GetCalendar()
    {
        var bankHolidayCalendar = new HolidayCalendar();
        bankHolidayCalendar.AddExcludedDate(DateTime.Today.AddDays(1));
        return bankHolidayCalendar;
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Topshelf.Quartz.Integration:

Package Downloads
Topshelf.Quartz.Ninject.Integration

Topshelf.Quartz.Ninject.Integration provides extensions to Topshelf.Quartz allowing you to schedule jobs, built from your Ninject IoC Container, with your service class.

Topshelf.Quartz.Extensions

Topshelf.Quartz.Extensions provides extensions to schedule Quartz jobs along with your service class.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.6 79,091 11/15/2019
5.0.5 812 11/8/2019
5.0.4 703 11/5/2019