generated from wenjy/SlnMesnac
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.
32 lines
802 B
C#
32 lines
802 B
C#
using Quartz;
|
|
using SlnMesnac.Business;
|
|
using SlnMesnac.Serilog;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SlnMesnac.Quartz.Job
|
|
{
|
|
public class AutoModeJob : IJob
|
|
{
|
|
|
|
public readonly SerilogHelper _logger;
|
|
|
|
public readonly AutoModeBusiness _autoModeBusiness;
|
|
|
|
public AutoModeJob(SerilogHelper logger, AutoModeBusiness autoModeBusiness)
|
|
{
|
|
_logger = logger;
|
|
_autoModeBusiness = autoModeBusiness;
|
|
}
|
|
|
|
public Task Execute(IJobExecutionContext context)
|
|
{
|
|
_logger.Info($"执行自动巡检任务:{DateTime.Now.ToString("HH:mm:ss")}");
|
|
_autoModeBusiness.AutoModelEvent();
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|