Admin
2025-12-02 9e42f0dafa019f5ecf6b0ff425ecb966b002171e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Microsoft.AspNetCore.Builder;
using System;
using System.Collections.Generic;
using System.Text;
using Quartz.Spi;
using Quartz.Impl;
using WIDESEA.Core.Utilities;
 
namespace WIDESEA.Job
{
    public static class JobMiddleware
    {
        public static void UseQuartzJobMildd(this IApplicationBuilder app)
        {
            if (app == null) throw new ArgumentNullException(nameof(app));
            try
            {
                StdSchedulerFactory factory = new StdSchedulerFactory();
                SchedulerCenterServer schedulerCenter = new SchedulerCenterServer(factory);
                WebResponseContent content2 = schedulerCenter.AddScheduleJobAsync("JobSchedulerForMeasure").Result;
            }
            catch(Exception ex)
            {
                Console.Out.WriteLine(ex.ToString());
            }
        }
    }
}