You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
614 B
C#

1 year ago
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Quartz;
using Quartz.Logging;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Durkee.Mes.Api.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;
}
}
}