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.

24 lines
594 B
C#

5 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Quartz;
using Quartz.Core;
namespace TopshelfStudy.NetCoreDemo
{
public class JobDemo : IJob
{
public async Task Execute(IJobExecutionContext context)
{
//模拟业务操作
string jobName = "测试作业";
Console.WriteLine($"{jobName} 开始执行");
Console.WriteLine($"{jobName} 执行中...");
await Task.Delay(0*1000);
Console.WriteLine($"{jobName} 执行完毕.");
}
}
}