using Microsoft.Extensions.Logging;
using Quartz;
using System;
using System.Threading.Tasks;

namespace SlnMesnac.Quartz.Job
{
    public class MyJob : IJob
    {
        private readonly ILogger<MyJob> _logger;

        public MyJob(ILogger<MyJob> logger)
        {
            _logger = logger;
        }

        public Task Execute(IJobExecutionContext context)
        {
            _logger.LogInformation($"执行MyJob：{DateTime.Now.ToString("HH:mm:ss")}");
            return Task.CompletedTask;
        }
    }
}
