using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; namespace FrontendWorkerService.Quartz { /// /// Job調度中間對象 /// public class JobSchedule { public JobSchedule(Type jobType, string cronExpression) { this.JobType = jobType ?? throw new ArgumentNullException(nameof(jobType)); CronExpression = cronExpression ?? throw new ArgumentNullException(nameof(cronExpression)); } /// /// Job類型 /// public Type JobType { get; private set; } /// /// Cron表達式 /// public string CronExpression { get; private set; } /// /// Job狀態 /// public JobStatus JobStatu { get; set; } = JobStatus.Init; } /// /// Job運行狀態 /// public enum JobStatus : byte { [Description("初始化")] Init = 0, [Description("運行中")] Running = 1, [Description("調度中")] Scheduling = 2, [Description("已停止")] Stopped = 3, } }