Exemple #1
0
        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);
        }
Exemple #2
0
 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);
 }
Exemple #3
0
 public static void Trigger(string recurringJobId)
 {
     Instance.Value.Trigger(JobPrefixManager.GetJobId(recurringJobId));
 }
Exemple #4
0
        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);
        }
Exemple #5
0
 public static void RemoveIfExists(string recurringJobId)
 {
     Instance.Value.RemoveIfExists(JobPrefixManager.GetJobId(recurringJobId));
 }