diff --git a/README.md b/README.md index 87a2bb3..c245036 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,27 @@ Wrapper above [Quartz.NET] (https://github.com/quartznet/quartznet) for .NET Cor .WithSimpleSchedule(x => x.WithIntervalInSeconds(2).RepeatForever())); return result; }) + ``` +1. ConfigureQuartzHost Must be call after Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults() + + ``` + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + webBuilder.ConfigureKestrel(serverOptions => + { + serverOptions.AllowSynchronousIO = true; + }); + }) + .ConfigureQuartzHost(); + } ``` \ No newline at end of file diff --git a/src/QuartzHostedService/QuartzHostedService.csproj b/src/QuartzHostedService/QuartzHostedService.csproj index 73851e6..25093f9 100644 --- a/src/QuartzHostedService/QuartzHostedService.csproj +++ b/src/QuartzHostedService/QuartzHostedService.csproj @@ -4,7 +4,7 @@ netcoreapp3.0 mukmyash - 0.0.6 + 0.0.7 true https://github.com/mukmyash/QuartzHostedService Wrapper above [Quartz.NET] (https://github.com/quartznet/quartznet) for .NET Core.