Table of Contents

Class CheckExpiredObservationsJob

Namespace
adas_core.Application.Services
Assembly
adas-core.Application.dll

Represents a background job that checks for expired observations, scheduled to run using the Quartz.NET job scheduling system.

[DisallowConcurrentExecution]
public class CheckExpiredObservationsJob : IJob
Inheritance
CheckExpiredObservationsJob
Implements
IJob
Inherited Members
Extension Methods

Remarks

The Quartz.DisallowConcurrentExecutionAttribute attribute ensures that only one instance of this job can execute at a given time, preventing overlapping runs that could lead to duplicate processing of expired observations.

Properties

ObservationService

public static IObservationService ObservationService { get; set; }

Property Value

IObservationService

Methods

Execute(IJobExecutionContext)

Executes the scheduled job that checks and expires observations, recalculating dependent data. Uses a global flag to prevent concurrent execution of the expiration logic, and logs the start, duration, and any errors encountered.

public Task Execute(IJobExecutionContext context)

Parameters

context IJobExecutionContext

The job execution context provided by the scheduler.

Returns

Task