chengsc
2025-05-13 6167bf4c8fe617d9f9861585042149d48ad15dbb
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;
        }
 
 
    }
}