zhaowc
2024-08-29 25df87113f92a1ad32e8e5f3b0dc9252e38575c9
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;
        }
 
 
    }
}