using Cleanuparr.Domain.Enums; using Cleanuparr.Infrastructure.Features.Jobs; using Cleanuparr.Infrastructure.Models; using Quartz; namespace Cleanuparr.Infrastructure.Services.Interfaces; public interface IJobManagementService { Task StartJob(JobType jobType, JobSchedule? schedule = null, string? directCronExpression = null); Task StopJob(JobType jobType); Task TriggerJobOnce(JobType jobType); /// /// Schedules the first targeted MalwareBlocker scan for a single download received via an *arr "On Grab" webhook. /// Subsequent retries are scheduled by the handler via only while the download has not been found. /// Task TriggerMalwareBlockerWebhook(Guid instanceId, string downloadId, long contentId, InstanceType type); /// /// Schedules the next targeted MalwareBlocker webhook scan after a completed attempt. /// Task ScheduleMalwareBlockerWebhookRetry(WebhookScanTarget target); Task> GetAllJobs(IScheduler? scheduler = null); Task GetJob(JobType jobType); Task UpdateJobSchedule(JobType jobType, JobSchedule schedule); }