/// <inheritdoc/> public void AddJob(IJob jobObject, JobStartType startType = JobStartType.Immediate) { if (this.IsJobRegistered(jobObject.GetType())) { return; // Job is already added } var ji = new JobExecutionInfo(jobObject, startType, new object[0]); this.m_jobs.Add(ji); if (startType == JobStartType.Immediate) { this.m_threadPool.QueueUserWorkItem(this.RunJob, ji); } }
/// <summary> /// Add a job to the job manager /// </summary> public void AddJob(IJob jobType, JobStartType jobStartType = JobStartType.Immediate) { // Not supported }
/// <summary> /// Add a job to the job manager /// </summary> public void AddJob(IJob jobType, TimeSpan elapseTime, JobStartType jobStartType = JobStartType.Immediate) { // Not supported }
/// <summary> /// Start the job /// </summary> public JobExecutionInfo(IJob job, JobStartType startType, Object[] parameters) { this.Job = job; this.StartType = startType; this.Parameters = parameters; }
/// <inheritdoc/> public void AddJob(IJob jobObject, TimeSpan interval, JobStartType startType = JobStartType.Immediate) { this.AddJob(jobObject, startType); this.SetJobSchedule(jobObject, interval); }