View Source
Class RecurringBackgroundJobHostedService<TJob>
Runs a recurring background job inside a hosted service.
Generic version for DependencyInjection
Inheritance
System.Object
Assembly: Umbraco.Infrastructure.dll
Syntax
public class RecurringBackgroundJobHostedService<TJob> : RecurringHostedServiceBase where TJob : IRecurringBackgroundJob
Type Parameters
Name |
Description |
TJob |
Type of the Job
|
Constructors
View Source
RecurringBackgroundJobHostedService(IRuntimeState, ILogger<RecurringBackgroundJobHostedService<TJob>>, IMainDom, IServerRoleAccessor, IEventAggregator, TJob)
Declaration
public RecurringBackgroundJobHostedService(IRuntimeState runtimeState, ILogger<RecurringBackgroundJobHostedService<TJob>> logger, IMainDom mainDom, IServerRoleAccessor serverRoleAccessor, IEventAggregator eventAggregator, TJob job)
Parameters
Methods
View Source
Declaration
public override async Task PerformExecuteAsync(object state)
Parameters
Type |
Name |
Description |
System.Object |
state |
|
Returns
View Source
StartAsync(CancellationToken)
Declaration
public override async Task StartAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
View Source
StopAsync(CancellationToken)
Declaration
public override async Task StopAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns