using System;
using System.Collections.Generic;
using Quartz;
using Quartz.Impl;
using Quartz.Impl.Triggers;
namespace Demo.Job
{
public static class QuartzUtil
{
private static ISchedulerFactory sf = null;
private static IScheduler sched = null;
static QuartzUtil()
{
sf = new StdSchedulerFactory();
sched = sf.GetScheduler();
sched.Start();
}
///
/// 添加Job 并且以定点的形式运行
///
///
///
///
///
///
public static DateTimeOffset AddJob(string JobName, string CronTime, string jobData) where T : IJob
{
IJobDetail jobCheck = JobBuilder.Create().WithIdentity(JobName, JobName + "_Group").UsingJobData("jobData", jobData).Build();
ICronTrigger