using Quartz; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MESDataExtractQuartz.Job { public class MESTestJob : IJob { public async Task Execute(IJobExecutionContext context) { //向c:\Quartz.txt写入当前时间并换行 System.IO.File.AppendAllText(@"E:\桌面\Quartz.txt", DateTime.Now + Environment.NewLine); } } }