Ejemplo n.º 1
0
 /// <summary>
 ///		Returns whether or not the service is suspected to have
 ///		crashed.  This is based on whether 2 cycle times have passed
 ///		since the last run or 2 heartbeat cycle times have passed
 ///		since the last heartbeat.
 /// </summary>
 /// <returns></returns>
 public bool IsCrashSuspected()
 {
     return
         (Math.Abs(LastRunTime.Subtract(_serverTime).TotalMinutes) > RunIntervalMinutes * 2 ||
          // More than 2 cycles times have passed since last run time
          Math.Abs(LastHeartbeat.Subtract(_serverTime).TotalMinutes) > EngineBase.HEARTBEAT_INTERVAL.TotalMinutes * 2);
     // More than 2 heartbeat cycle times have passed since last heartbeat
 }
Ejemplo n.º 2
0
 public int CompareTo(SchedulerSyncJob other)
 {
     if (Status == other.Status || (Status != "Idle" && other.Status != "Idle"))
     {
         return(LastRunTime.CompareTo(other.LastRunTime));
     }
     else if (Status == "Idle")
     {
         return(-1);
     }
     else
     {
         return(1);
     }
 }
Ejemplo n.º 3
0
 public void Increment()
 {
     LastRunTime = NextRunTime;
     NextRunTime = LastRunTime.AddMilliseconds(Interval);
 }
 public void Increment()
 {
     LastRunTime = NextRunTime;
     NextRunTime = LastRunTime.AddMilliseconds(Schedule);
 }
Ejemplo n.º 5
0
 public void Increment()
 {
     LastRunTime = NextRunTime;
     NextRunTime = LastRunTime.Add(TimeBetweenExecutions);
 }
Ejemplo n.º 6
0
 public void Increment()
 {
     LastRunTime = NextRunTime;
     NextRunTime = LastRunTime.AddMilliseconds(PeriodMS);
 }