using Admin.Core.Common; using Admin.Core.IService.ISys; using Quartz; using S71500.Impl; using System; using System.Threading.Tasks; /// /// 这里要注意下,命名空间和程序集是一样的,不然反射不到 /// namespace Admin.Core.Tasks { public class Job_Admin_Quartz : JobBase, IJob { string address = Appsettings.app("Siemens", "ConString").ToString(); int port = Appsettings.app("Siemens", "Port").ObjToInt(); public Job_Admin_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService) { _SysTasksQzService = SysTasksQzService; _sysJobLogService = sysJobLogService; } public async Task Execute(IJobExecutionContext context) { await ExecuteJob(context, async () => await Run(context)); } public Task Run(IJobExecutionContext context) { return Task.CompletedTask; } } }