Hangfire
Installation
dotnet add package Dosaic.Plugins.Jobs.Hangfire<PackageReference Include="Dosaic.Plugins.Jobs.Hangfire" Version="" />Appsettings.yml
hangfire:
Host: localhost
Port: 5432
Database: postgres
User: postgres
Password: postgres
InMemory: true
enableJobsByFeatureManagementConfig: false
allowedDashboardHost: localhost # you need to set this configuration to be able to access the dashboard from the specified host
invisibilityTimeoutInMinutes: 30
featureManagement: # we can conveniently can use the microsoft feature management system to enable jobs based on configuration
hangfireTestJob: true # if you have enabled the 'enableJobsByFeatureManagementConfig: true' then you can configure here if your jobs should run on execution or not, useful for multiple environments etc.Configuration in your plugin host
Usage
Auto registration of jobs
Define jobs
Without parameters
With parameters
Fire and forget jobs or enqueue dynamically
Attributes
UniquePerQueueAttribute
JobCleanupExpirationTimeAttribute
Filters
LogJobExecutionFilter
EnabledByFeatureFilter
Last updated