public static void AddOrUpdate <T>(Expression <Func <T, Task> > methodCall, string cronExpression, TimeZoneInfo timeZone = null, string queue = "default") { Job job = Job.FromExpression <T>(methodCall); string recurringJobId = JobPrefixManager.GetJobId(GetRecurringJobId(job)); Instance.Value.AddOrUpdate(recurringJobId, job, cronExpression, timeZone ?? TimeZoneInfo.Utc, queue); }
public static void AddOrUpdate(string recurringJobId, Expression <Func <Task> > methodCall, Func <string> cronExpression, TimeZoneInfo timeZone = null, string queue = "default") { AddOrUpdate(JobPrefixManager.GetJobId(recurringJobId), methodCall, cronExpression(), timeZone, queue); }
public static void Trigger(string recurringJobId) { Instance.Value.Trigger(JobPrefixManager.GetJobId(recurringJobId)); }
public static void AddOrUpdate(string recurringJobId, Expression <Action> methodCall, string cronExpression, TimeZoneInfo timeZone = null, string queue = "default") { Job job = Job.FromExpression(methodCall); Instance.Value.AddOrUpdate(JobPrefixManager.GetJobId(recurringJobId), job, cronExpression, timeZone ?? TimeZoneInfo.Utc, queue); }
public static void RemoveIfExists(string recurringJobId) { Instance.Value.RemoveIfExists(JobPrefixManager.GetJobId(recurringJobId)); }