Info
Version: | 1.5.1 |
Author(s): | Burak Aydemir |
Last Update: | Monday, January 4, 2021 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/Schedulr |
Install
Install-Package Schedulr
dotnet add package Schedulr
paket add Schedulr
Schedulr Download (Unzip the "nupkg" after downloading)
Dependencies
.NETFramework 4.7
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
- Autofac(>= 6.1.0)
- Autofac.Extras.Quartz(>= 6.0.1)
- Microsoft.Extensions.Configuration(>= 5.0.0)
- Microsoft.Extensions.Configuration.Json(>= 5.0.0)
- Quartz(>= 3.2.3)
- Serilog.Enrichers.AssemblyName(>= 1.0.9)
- Serilog.Enrichers.Environment(>= 2.1.3)
- Serilog.Exceptions(>= 6.0.0)
- Serilog.Settings.AppSettings(>= 2.2.2)
- Serilog.Settings.Configuration(>= 3.1.0)
- Serilog.Sinks.Console(>= 3.1.1)
- Topshelf(>= 4.3.0)
- Topshelf.Serilog(>= 4.3.0)
Tags
-just update your schedulrsettings.json as what you want.
-use like below lines in your Program.cs
SchedulrManager.Build("My Service");
SchedulrManager.Add(() =>
{
Console.WriteLine("Foo");
});
SchedulrManager.Add(MyMethod);
SchedulrManager.Add(new MyJob());
SchedulrManager.Start();
-for install as a windows service run "applicationname.exe install"
-if you want to use File log for Serilog just use "Install-Package Serilog.Sinks.File" and add this below line to schedulrsettings.json.
{
"Name": "File",
"Args": {
"path": ".\\Logs\\.txt",
"rollingInterval": "Day",
"retainedFileCountLimit": null,
"outputTemplate": "[{Level:u3}] {Timestamp} | {SourceContext} | {Application}-{Environment} ({AssemblyVersion}) | {MachineName}{NewLine}{Message:lj}{NewLine}{Exception}"
}
},
-if you want to use Seq for Serilog just use "Install-Package Serilog.Sinks.Seq" and add this below line to schedulrsettings.json.
{
"Name": "Seq",
"Args": { "serverUrl": "http://localhost:5341" }
}.