using FluentScheduler;
using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Caching.Memory;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Performance.Repository;
using Performance.DtoModels;
using Performance.Services;

namespace Performance.Api
{
    public class JobRegistry : Registry
    {
        public JobRegistry(IServiceProvider provider)
        {
            //Schedule<ExtractDataJob>().ToRunNow().AndEvery(1).Days().At(23, 0);
            //Schedule<ExtractDataJob>().ToRunEvery(1).Days().At(23, 0);
            Schedule(() => provider.GetService<ExtractGenerateJob>()).ToRunEvery(1).Days().At(23, 00);
        }
    }
}
