Esempio n. 1
0
 public static ITrigger CreateTrigger <TJob>(this JobSchedule <TJob> jobSchedule)
     where TJob : IJob
 {
     return(TriggerBuilder
            .Create()
            .WithIdentity($"{typeof(TJob).FullName}.trigger")
            .WithCronSchedule(jobSchedule.CronExpression)
            .WithDescription(jobSchedule.CronExpression)
            .Build());
 }
Esempio n. 2
0
        public static IJobDetail CreateJob <TJob>(this JobSchedule <TJob> schedule)
            where TJob : IJob
        {
            var jobType = typeof(TJob);

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