Exemple #1
0
        public JobMetadata ExtractData(BaseJob job)
        {
            if (!IsScheduleExpressionValid(job.Schedule))
            {
                throw new ArgumentNullException(nameof(job.Schedule));
            }

            Type  = job.GetType();
            Name  = job.GetName();
            Group = job.GetGroup();

            var jobDetail = JobDetailService.GetJobDetail(Name, Group);

            Schedule    = jobDetail?.JobSchedule ?? job.Schedule;
            Description = jobDetail?.JobDescription ?? job.GetDescription();

            State = jobDetail?.StatusId ?? (byte)JobState.Normal;

            return(this);
        }