|
|
using Microsoft.Extensions.Logging;
|
|
|
using Quartz;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
namespace SlnMesnac.Quartz.Job
|
|
|
{
|
|
|
internal class Job2 : IJob
|
|
|
{
|
|
|
private readonly ILogger<Job2> _logger;
|
|
|
|
|
|
public Job2(ILogger<Job2> logger)
|
|
|
{
|
|
|
_logger = logger;
|
|
|
}
|
|
|
|
|
|
public Task Execute(IJobExecutionContext context)
|
|
|
{
|
|
|
_logger.LogInformation($"执行Job2:{DateTime.Now.ToString("HH:mm:ss")}");
|
|
|
return Task.CompletedTask;
|
|
|
}
|
|
|
}
|
|
|
}
|