- Executing the exe will run the service in a console
- Windowsservice can be installed via cmd.exe (Run as Administrator) -
Service.exe install
- For uninstallation use
Service.exe uninstall
This class is for registrering the types for the dependency Injection.
- Registration of Servicecontrollers
- Registration of IConfiguration - Provides reading the
appsettings.json
- Registration of Settings - Helperclass for easier access of the configuration
- Registration of the QuartzModule
- Registration of the Controller
If jobs are not executed, turn on the logging of Quartz. The QuartzConsoleLogProvider.cs
implements a logger which is logging to the console.
Registration of the logprovider
LogProvider.SetCurrentLogProvider(new QuartzConsoleLogProvider());
Job are the task which your service should run. These must implement the IJob
interface.
If this job needs some additional data you can use the JobDataMap
. (see «QuartzController.cs» and MyJob.cs
)
Quarzt provides several triggers for executing jobs at a certain time.
Examples are provided in QuartzController.cs
:
- Execute job once
- Executing job with intervall
- Delete a job from queue