using Microsoft.Extensions.Configuration;

namespace JobScheduler.Tasks;

/// <summary>
/// A named unit of work invoked by <see cref="JobScheduler.Scheduling.JobSchedulerHostedService"/>.
/// </summary>
public interface IJobTask
{
    /// <summary>Matches <c>Jobs:Tasks:*:TaskType</c> in configuration.</summary>
    string TaskType { get; }

    Task ExecuteAsync(IConfiguration parametersSection, CancellationToken cancellationToken);
}
