Exemplo n.º 1
0
        public void Schedule(string workKey, Action work, TimeSpan interval, string description = null)
        {
            Func <Task> factory    = () => Task.Factory.StartNew(work);
            var         definition = new JobDefinition(workKey, factory, Schedules.Interval(interval), description);

            Schedule(definition);
        }
Exemplo n.º 2
0
 public static JobDefinition Daily(string jobkey, Action exe, TimeSpan daytime, string description = null)
 {
     return(Schedule(jobkey, exe, Schedules.Daily(daytime), description));
 }
Exemplo n.º 3
0
 public static JobDefinition Interval(string jobKey, Func <Task> factory, TimeSpan interval, string description = null)
 {
     return(new JobDefinition(jobKey, factory, Schedules.Interval(interval), description));
 }
Exemplo n.º 4
0
 public static JobDefinition Interval(string jobKey, Action exe, TimeSpan interval, string description = null)
 {
     return(Schedule(jobKey, exe, Schedules.Interval(interval), description));
 }
Exemplo n.º 5
0
        public void Schedule(string workKey, Func <Task> factory, TimeSpan interval, string description = null)
        {
            var definition = new JobDefinition(workKey, factory, Schedules.Interval(interval), description);

            Schedule(definition);
        }