Beispiel #1
0
 private ITrigger CreateTrigger(ScheduledJob schedule)
 {
     return(TriggerBuilder
            .Create()
            .WithIdentity($"{schedule.Type.FullName}.trigger")
            .WithCronSchedule(schedule.CronExpression)
            .WithDescription(schedule.Description ?? schedule.Type.FullName)
            .Build());
 }
Beispiel #2
0
        private IJobDetail CreateJob(ScheduledJob schedule)
        {
            var jobType = schedule.Type;

            return(JobBuilder
                   .Create(jobType)
                   .WithIdentity(jobType.FullName)
                   .WithDescription(jobType.Name)
                   .Build());
        }