C# Class Ywdsoft.Utility.QuartzHelper

任务处理帮助类
Datei anzeigen Open project: CrazyJson/TaskManager Class Usage Examples

Public Methods

Method Description
DeleteJob ( string JobKey ) : void

删除现有任务

GetTaskeFireTime ( string CronExpressionString, int numTimes ) : List

获取任务在未来周期内哪些时间会运行

InitScheduler ( ) : void

初始化任务调度对象

PauseJob ( string JobKey ) : void

暂停任务

ResumeJob ( string JobKey ) : void

恢复运行暂停的任务

RunOnceTask ( string JobKey ) : void

立即运行一次任务

ScheduleJob ( TaskUtil taskUtil, bool isDeleteOldTask = false ) : void

启用任务 任务信息 是否删除原有任务 返回任务trigger

StartScheduler ( ) : void

启用任务调度 启动调度时会把任务表中状态为“执行中”的任务加入到任务调度队列中

StopSchedule ( ) : void

停止任务调度

ValidExpression ( string cronExpression ) : bool

校验字符串是否为正确的Cron表达式

Private Methods

Method Description
GetClassInfo ( string assemblyName, string className ) : Type
QuartzHelper ( ) : System

Method Details

DeleteJob() public static method

删除现有任务
public static DeleteJob ( string JobKey ) : void
JobKey string
return void

GetTaskeFireTime() public static method

获取任务在未来周期内哪些时间会运行
public static GetTaskeFireTime ( string CronExpressionString, int numTimes ) : List
CronExpressionString string Cron表达式
numTimes int 运行次数
return List

InitScheduler() public static method

初始化任务调度对象
public static InitScheduler ( ) : void
return void

PauseJob() public static method

暂停任务
public static PauseJob ( string JobKey ) : void
JobKey string
return void

ResumeJob() public static method

恢复运行暂停的任务
public static ResumeJob ( string JobKey ) : void
JobKey string 任务key
return void

RunOnceTask() public static method

立即运行一次任务
public static RunOnceTask ( string JobKey ) : void
JobKey string 任务key
return void

ScheduleJob() public static method

启用任务 任务信息 是否删除原有任务 返回任务trigger
public static ScheduleJob ( TaskUtil taskUtil, bool isDeleteOldTask = false ) : void
taskUtil TaskUtil
isDeleteOldTask bool
return void

StartScheduler() public static method

启用任务调度 启动调度时会把任务表中状态为“执行中”的任务加入到任务调度队列中
public static StartScheduler ( ) : void
return void

StopSchedule() public static method

停止任务调度
public static StopSchedule ( ) : void
return void

ValidExpression() public static method

校验字符串是否为正确的Cron表达式
public static ValidExpression ( string cronExpression ) : bool
cronExpression string 带校验表达式
return bool