private string Schedule => "0 0 2 * * *"; //Runs every 2 hours public DownloadedFilesCleaner(ILogger <DownloadedFilesCleaner> logger, DownloadedCache downloadedCache) { _schedule = CrontabSchedule.Parse(Schedule, new CrontabSchedule.ParseOptions { IncludingSeconds = true }); _nextRun = _schedule.GetNextOccurrence(DateTime.Now); _logger = logger; _downloadedCache = downloadedCache; }
public DownloadFileController(DownloadedCache downloadedCache) { _downloadedCache = downloadedCache; }