yuyou_x
2024-07-15 8a96c3a12176cf915e2d37c163c075f64c11fc16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Quartz;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
 
namespace Utility
{
    public class TestJob : IJob
    {
        public async Task Execute(IJobExecutionContext context)
        {
            Console.WriteLine($"【任务执行】:{DateTime.Now}");
            Console.WriteLine($"【触发时间】:{context.ScheduledFireTimeUtc?.LocalDateTime}");
            Console.WriteLine($"【下次触发时间】:{context.NextFireTimeUtc?.LocalDateTime}");
            await Task.CompletedTask;
        }
 
 
    }
}