예제 #1
0
 public static void StartTasks()
 {
     foreach (var instance in RP.GetTasksReprository())
     {
         AddTask(instance.Title, instance.StartSeconds);
     }
 }
예제 #2
0
 public static void CacheItemRemoved(string k, object v, CacheItemRemovedReason r)
 {
     foreach (var instance in RP.GetTasksReprository())
     {
         if (k == instance.Title)
         {
             try
             {
                 instance.Execute();
             }
             catch (Exception e)
             {
                 SF.LogError(e);
             }
             AddTask(k, SF.RandomNumber(instance.IntervalSecondsFrom, instance.IntervalSecondsTo));
         }
     }
 }