Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 public static void Trigger(string recurringJobId)
 {
     Instance.Value.Trigger(JobPrefixManager.GetJobId(recurringJobId));
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 public static void RemoveIfExists(string recurringJobId)
 {
     Instance.Value.RemoveIfExists(JobPrefixManager.GetJobId(recurringJobId));
 }