示例#1
0
        public static void AddOrUpdate(
            this IRecurringManager manager,
            string recurringJobId,
            Job job,
            string cronExpression,
            TimeZoneInfo timeZone,
            string queue,
            bool onlyIfLastFinishedOrFailed)
        {
            if (manager == null)
            {
                throw new ArgumentNullException(nameof(manager));
            }
            if (timeZone == null)
            {
                throw new ArgumentNullException(nameof(timeZone));
            }
            if (queue == null)
            {
                throw new ArgumentNullException(nameof(queue));
            }

            manager.AddOrUpdate(
                recurringJobId,
                job,
                cronExpression,
                new RecurringJobOptions {
                QueueName = queue, TimeZone = timeZone, OnlyIfLastFinishedOrFailed = onlyIfLastFinishedOrFailed
            });
        }
示例#2
0
 public static void AddOrUpdate(
     this IRecurringManager manager,
     string recurringJobId,
     Job job,
     string cronExpression,
     bool onlyIfLastFinishedOrFailed)
 {
     AddOrUpdate(manager, recurringJobId, job, cronExpression, TimeZoneInfo.Utc, onlyIfLastFinishedOrFailed);
 }
示例#3
0
 public static void AddOrUpdate(
     this IRecurringManager manager,
     string recurringJobId,
     Job job,
     string cronExpression,
     TimeZoneInfo timeZone,
     bool onlyIfLastFinishedOrFailed)
 {
     AddOrUpdate(manager, recurringJobId, job, cronExpression, timeZone, EnqueuedState.DefaultQueue, onlyIfLastFinishedOrFailed);
 }