Info
Version: | 3.0.329 |
Author(s): | Davyd McColl |
Last Update: | Wednesday, November 13, 2024 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/fluffynuts/PeanutButter |
NuGet Url: | https://www.nuget.org/packages/PeanutButter.ServiceShell |
Install
Install-Package PeanutButter.ServiceShell
dotnet add package PeanutButter.ServiceShell
paket add PeanutButter.ServiceShell
PeanutButter.ServiceShell Download (Unzip the "nupkg" after downloading)
Dependencies
net452
- PeanutButter.WindowsServiceManagement(>= 2.0.5)
- CommandLineParser(>= 1.9.71)
- log4net(>= 2.0.8)
- PeanutButter.WindowsServiceManagement(>= 2.0.5)
- CommandLineParser(>= 1.9.71)
- log4net(>= 2.0.8)
Tags
1.
Inherit from `Shell`
2. Set Desdcription, ServiceName, and, optionally, Version
3. override `RunOnce`
4. remember to call Shell.RunMain<MyService>(args) from your Program/Main method
Service Shell provides an easy way to run polling services - simply implement the
RunOnce method and set your interval.
Shell ensures that the RunOnce is not re-entered:
if your poll time exceeds the interval, you'll simply run polls back-to-back
Including (4) means you can, from the cli, perform the following with the service:
- install
- uninstall
- start
- stop
- restart
- run-once (for testing or for running from another scheduler).